{"id":21163516,"url":"https://github.com/punktde/ansible-proserver-template","last_synced_at":"2025-04-13T13:42:14.387Z","repository":{"id":40415404,"uuid":"128659776","full_name":"punktDe/ansible-proserver-template","owner":"punktDe","description":"This example playbook demonstrates the use of our publicly available Ansible roles for the proServer.","archived":false,"fork":false,"pushed_at":"2024-02-05T06:54:42.000Z","size":63,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-27T04:41:42.577Z","etag":null,"topics":["ansible","proserver"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/punktDe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-08T16:19:16.000Z","updated_at":"2024-06-17T14:35:16.000Z","dependencies_parsed_at":"2024-01-18T17:03:17.659Z","dependency_job_id":"7212b78d-1ce2-4862-a9e0-d84af930329e","html_url":"https://github.com/punktDe/ansible-proserver-template","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punktDe%2Fansible-proserver-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punktDe%2Fansible-proserver-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punktDe%2Fansible-proserver-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/punktDe%2Fansible-proserver-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/punktDe","download_url":"https://codeload.github.com/punktDe/ansible-proserver-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724489,"owners_count":21151557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","proserver"],"created_at":"2024-11-20T13:48:15.233Z","updated_at":"2025-04-13T13:42:14.364Z","avatar_url":"https://github.com/punktDe.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# proServer Ansible Template\n\nThis repository contains Ansible playbook examples for your proServer.\nIt depends on our open [open source Ansible roles](https://github.com/punktDe?q=topic%3Aproserver+topic%3Aansible), which are included as submodules.\nAs of now, there are two supported applications:\n\n- [Neos](https://www.neos.io/)\n- [TYPO3](https://typo3.org/)\n\nThere are several components (roles):\n\n**Relational databases**\n\n- [PostgreSQL](https://github.com/punktDe/ansible-proserver-postgresql)\n- [MySQL / MariaDB](https://github.com/punktDe/ansible-proserver-mariadb)\n\n**Full text search databases**\n\n- [Elasticsearch](https://github.com/punktDe/ansible-proserver-elasticsearch)\n- [Apache Solr](https://github.com/punktDe/ansible-proserver-solr)\n\n**In-memory databases**\n\n- [Redis](https://github.com/punktDe/ansible-proserver-redis)\n\n**Web servers**\n\nYou can choose which web server to install by adding your host to the respective group (`apache` or `nginx`) in `inventory.ini`. Default is nginx\n\n- [nginx](https://github.com/punktDe/ansible-proserver-nginx)\n- [Apache](https://github.com/punktDe/ansible-proserver-apache)\n\n**Mail servers**\n\n- [Sendmail](https://github.com/punktDe/ansible-proserver-mail) (for production)\n- [MailHog](https://github.com/punktDe/ansible-proserver-mailhog) (for testing)\n\n**Other components**\n\n- [System](https://github.com/punktDe/ansible-proserver-system) (base system configuration)\n- [PHP and PHP-FPM](https://github.com/punktDe/ansible-proserver-php)\n- [Supervisor](https://github.com/punktDe/ansible-proserver-supervisord) (to manage custom daemons)\n- [OAuth2 Proxy](https://github.com/punktDe/ansible-proserver-oauth2-proxy) (for advanced access control)\n- [Dehydrated](https://github.com/punktDe/ansible-proserver-dehydrated) (for acquiring X.509 certificates using ACME / Let's Encrypt)\n\n## Getting Started\n\n**1)** Clone this repository\n\n```bash\ngit clone https://github.com/punktDe/ansible-proserver-template.git\ncd ansible-proserver-template\n```\n\n**2)** Install Ansible on your local machine. Ansible \u003e=2.15 should work. See the [Ansible Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) for detailed instructions for your operating system. If you have Python 3 and venv installed, you can use this command:\n\n```bash\npython3 -m venv venv\nvenv/bin/pip install -r requirements.txt\nsource .envrc \nansible-galaxy install -r requirements.yml\n```\n\nYou can also use [direnv](https://direnv.net/) to automatically activate the virtual environment and install dependencies when you enter the project folder.\n\n**4)** Adapt Ansible configuration\n\nBasically there are two files, that define the services and configuration for your proServer instance:\n\n[**inventory.ini**](inventory.ini)\n\nYour inventory contains a list of hosts (proServers) and the groups each host belongs to.\nThe groups are later used by the playbook to determine which roles\n(applications and components) to provision on a host.\n\nReplace at least any occurrence of `vpro0000` with your proServer ID(s) and\nuncomment `staging`/`production` within the application groups section.\n\n[**host_vars/**](host_vars/)\n\nThe [`host_vars`](host_vars/) directory contains a number of files, each file represents a host from your inventory.\nYou can copy examples from the [`host_vars_examples`](host_vars_examples/) directory.\n`development.yaml` represents the development environment (Vagrant+VirtualBox).\n\n```bash\nmv host_vars_examples/neos/* host_vars/\n```\n\nThen replace at least any occurrence of `vpro0000` with your proServer ID(s).\n\n## Secret management\n\nWe recommend using [bitwarden-cli](https://bitwarden.com/help/cli/) to manage secrets.\n\nAfter setting up the CLI client, replace the placeholder in `vault_password_file_example` with the name of the password in your Bitwarden vault, and rename the file to `vault_password_file`.\n\nIt's also possible to use another password manager or a secret management system, as long as it can output the secret in plaintext.\n\nAlternatively, you can remove the executable bit from `vault_password_file` and put your vault password in clear text. However, this is not recommended.\n\n## Start provisioning of your proServer\n\n```bash\nansible-playbook --ssh-extra-args=-oProxyJump=jumping@ssh-jumphost.karlsruhe.punkt.de --limit=staging playbook.yaml\n```\n\nReplace `--limit=staging` with `--limit=production` to provision the production environment.\nYou can also remove the limit parameter to provision all environments from your [`inventory.ini`](inventory.ini).\n\n## Neos configuration hints\n\nThe `neos` role will template the file [`/usr/local/etc/neos.env`](roles/neos/templates/neos.env.j2), which contains useful information about your environment (e.g. domain name, database type and credentials).\nYou can use the [`helhum/dotenv-connector`](https://github.com/helhum/dotenv-connector) package to read the file and use any variable it contains in your Neos configuration.\n\n```bash\ncomposer require helhum/dotenv-connector\ncomposer config extra.helhum/dotenv-connector.env-file /usr/local/etc/neos.env\n```\n\n```yaml\n# Configuration/Settings.yaml\nNeos:\n  Flow:\n    persistence:\n      backendOptions:\n        driver: \"%env:DB_DRIVER%\"\n        dbname: \"%env:DB_NAME%\"\n        user: \"%env:DB_USER%\"\n        password: \"%env:DB_PASS%\"\n        host: \"%env:DB_HOST%\"\n        charset: \"%env:DB_CHARSET%\"\n```\n\n## TYPO3 configuration hints\n\nThe `typo3` role will template the file [`/usr/local/etc/typo3.env`](roles/typo3/templates/typo3.env.j2), which contains useful information about your environment (e.g. domain name, database type and credentials).\nYou can use the [`helhum/dotenv-connector`](https://github.com/helhum/dotenv-connector) package to read the file and use any variable it contains in your TYPO3 configuration.\n\n```bash\ncomposer require helhum/dotenv-connector\ncomposer config extra.helhum/dotenv-connector.env-file /usr/local/etc/typo3.env\n```\n\n```php\n# htdocs/typo3conf/AdditionalConfiguration.php\n$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] = getenv('DB_NAME');\n$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] = getenv('DB_USER');\n$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] = getenv('DB_PASS');\n$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] = strpos(getenv('DB_HOST'), ':') === false ? getenv('DB_HOST') : '[' . getenv('DB_HOST') . ']';\n$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = getenv('SITE_DOMAIN');\n```\n\n## Deployment\n\n[Deployer](https://deployer.org/) can be used to deploy Neos or TYPO3 to a proServer.\n[`deployer_examples/`](deployer_examples/) contains a set of Deployer configuration examples.\n\n## Helpful links\n\n- [Ansible Installation Guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)\n- [Ansible Getting Started](https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunktde%2Fansible-proserver-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpunktde%2Fansible-proserver-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpunktde%2Fansible-proserver-template/lists"}