{"id":15437941,"url":"https://github.com/tchapi/ansible-playbooks","last_synced_at":"2025-07-09T17:06:37.346Z","repository":{"id":16462242,"uuid":"19214279","full_name":"tchapi/ansible-playbooks","owner":"tchapi","description":"Roles and playbooks for Ansible","archived":false,"fork":false,"pushed_at":"2024-03-04T19:11:27.000Z","size":290,"stargazers_count":28,"open_issues_count":1,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-19T20:16:36.466Z","etag":null,"topics":["ansible","ansible-playbooks","devops"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","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/tchapi.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,"zenodo":null}},"created_at":"2014-04-27T19:13:02.000Z","updated_at":"2025-03-13T09:41:33.000Z","dependencies_parsed_at":"2024-03-03T19:37:44.219Z","dependency_job_id":"6fae491a-3b3f-48fe-b1c0-66c48e64b891","html_url":"https://github.com/tchapi/ansible-playbooks","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tchapi/ansible-playbooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fansible-playbooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fansible-playbooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fansible-playbooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fansible-playbooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchapi","download_url":"https://codeload.github.com/tchapi/ansible-playbooks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Fansible-playbooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502146,"owners_count":23618555,"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","ansible-playbooks","devops"],"created_at":"2024-10-01T18:59:50.435Z","updated_at":"2025-07-09T17:06:36.942Z","avatar_url":"https://github.com/tchapi.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible playbooks\n\nA simple collection of roles and standard playbooks for deploying a common deployment / front application stack. These are mostly for PHP / Node + Caddy infrastructures, with MariaDB and Mongo database engines.\n\n\u003e NB : the default inventory file location is `/etc/ansible/hosts` on Linux, and `/usr/local/etc/ansible/hosts` on macOS\n\u003e You should include the ansible user to use when loging in, as so:\n\n```\n[frontend_server]\nmy.frontend.server.com ansible_user=ubuntu\nmy.other.frontend.server.com ansible_user=ubuntu\n```\n\n\u003e NB : We use the following groups `[frontend_node]`, `[frontend_php]` in the playbooks.\n\n## Roles available\n\n  - #### base\n\n    - Ensures that the server has at least some basics tools like `sudo` and `python-apt` for Ansible to run correctly. \n    - Updates and upgrades `apt`\n  \n  - #### backup\n\n    - Ensures a /var/backups/rolling folder is present\n    - Creates a DB + files backup script\n    - Creates a cron task for daily backups and uploads the backup somewhere safe (on a S3 compatible endpoint)\n\n  \u003e NB: You need to copy the `roles/backup/files/credentials.dist` file to `roles/backup/files/credentials` and put your provider credentials there. You might want to change the `region` too in `roles/backup/files/config` if needed.\n\n  - #### caddy\n\n    Ensures that `caddy`, is installed correctly and runs as a service. \n\n  - #### mongo\n\n    Ensures that `mongo-org` is the lastest and that the service is runnning correctly. \n\n  - #### node\n\n    Ensures that `node`, `npm` are installed correctly. \n\n  - #### maria_db\n\n    Ensures that `maria_db` is the lastest and that the service is runnning correctly. Adds a consistent `/root/.my.cnf` file for logging in.\n\n  - #### mlmmj \n\n    Installs postfix along with mlmmj using the configured MX domain. For more info on Mlmmj see [this blog post](http://www.foobarflies.io/a-simple-web-interface-for-mlmmj/)\n\n  - #### nginx\n\n    Ensures that `nginx` is the lastest and that the service is runnning correctly. Also uploads a secured configuration for `nginx`.\n\n  - #### php\n\n    Installs `php7.4` FPM and command line interface with a few standard modules, a sensible configuration file for cli and FPM, and the `composer` package manager.\n\n  - #### yarn\n\n    Ensures that `yarn` is installed correctly. \n\n## Playbooks\n\nThe playbooks are rather straightforward.\n\n\u003e Before deploying a new server, you must make sure that your user has sudo rights, and that your SSH key is authorized for a password-less login\n\nThis done, when deploying a new nodeJS server for instance (on macOS):\n\n    ansible-playbook --inventory=/usr/local/etc/ansible/hosts playbooks/frontend_node.yml\n\n#### mlmmj\n\nThis role is kind of \"standalone\". To use it, just play the mlmmj playbook alone, to install node and mlmmj in one go:\n\n    ansible-playbook --inventory=/usr/local/etc/ansible/hosts  playbooks/mlmmj.yml\n\n#### Reminder\n\nIf you want to execute a single shell command :\n\n    # Gets the speed of each cpu \n    ansible all -m shell -a \"cat /proc/cpuinfo | grep MHz\"\n\n## Licence\n\nThese roles and playbooks are released under the MIT licence. Enjoy !!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchapi%2Fansible-playbooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchapi%2Fansible-playbooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchapi%2Fansible-playbooks/lists"}