{"id":13753110,"url":"https://github.com/geerlingguy/ansible-role-drupal","last_synced_at":"2025-04-05T04:12:19.304Z","repository":{"id":17315669,"uuid":"20086468","full_name":"geerlingguy/ansible-role-drupal","owner":"geerlingguy","description":"Ansible Role - Drupal","archived":false,"fork":false,"pushed_at":"2025-01-31T03:25:00.000Z","size":135,"stargazers_count":93,"open_issues_count":0,"forks_count":51,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T03:08:36.573Z","etag":null,"topics":["ansible","cms","content-management","drupal","lamp","php","role"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/geerlingguy/drupal/","language":null,"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/geerlingguy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"geerlingguy","patreon":"geerlingguy"}},"created_at":"2014-05-23T04:11:07.000Z","updated_at":"2025-01-31T03:25:03.000Z","dependencies_parsed_at":"2025-02-09T02:10:28.608Z","dependency_job_id":"a2b2e510-2461-41d7-9e02-075f532a8a21","html_url":"https://github.com/geerlingguy/ansible-role-drupal","commit_stats":{"total_commits":163,"total_committers":10,"mean_commits":16.3,"dds":"0.10429447852760731","last_synced_commit":"27b758f43c46be3af8449b7e75706302425fa199"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-drupal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-drupal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-drupal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geerlingguy%2Fansible-role-drupal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geerlingguy","download_url":"https://codeload.github.com/geerlingguy/ansible-role-drupal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284951,"owners_count":20913704,"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","cms","content-management","drupal","lamp","php","role"],"created_at":"2024-08-03T09:01:16.334Z","updated_at":"2025-04-05T04:12:19.279Z","avatar_url":"https://github.com/geerlingguy.png","language":null,"funding_links":["https://github.com/sponsors/geerlingguy","https://patreon.com/geerlingguy"],"categories":["role"],"sub_categories":[],"readme":"# Ansible Role: Drupal\n\n[![CI](https://github.com/geerlingguy/ansible-role-drupal/actions/workflows/ci.yml/badge.svg)](https://github.com/geerlingguy/ansible-role-drupal/actions/workflows/ci.yml)\n\nBuilds and installs [Drupal](https://drupal.org/), an open source content management platform.\n\n## Requirements\n\nDrupal is a PHP-based application that is meant to run behind a typical LAMP/LEMP/LEPP/etc. stack, so you'll need at least the following:\n\n  - Apache or Nginx (Recommended: `geerlingguy.apache` or `geerlingguy.nginx`)\n  - MySQL or similar Database server (Recommended: `geerlingguy.mysql` or `geerlingguy.postgresql`)\n  - PHP (Recommended: `geerlingguy.php` along with other PHP-related roles like `php-mysql`).\n\nDrush is not an absolute requirement, but it's handy to have, and also required if you use this role to Install a Drupal site (`drupal_install_site: true`). You can use `geerlingguy.drush` to install Drush.\n\nGit is not an absolute requirement, but is required if you're deploying from a Git repository (e.g. `drupal_deploy: true`). You can use `geerlingguy.git` to install Git.\n\n## Role Variables\n\nAvailable variables are listed below, along with default values (see `defaults/main.yml`):\n\n### Deploy an existing project with Git\n\n    drupal_deploy: false\n    drupal_deploy_repo: \"\"\n    drupal_deploy_version: master\n    drupal_deploy_update: true\n    drupal_deploy_dir: \"/var/www/drupal\"\n    drupal_deploy_accept_hostkey: false\n\nSet `drupal_deploy` to `true` and `drupal_build_composer*` to `false` if you would like to deploy Drupal to your server from an existing Git repository. The other options all apply to the Git checkout operation:\n\n  - `repo`: Git repository address\n  - `version`: can be a branch, tag, or commit hash\n  - `update`: whether the repository should be updated to the latest commit, if `version` is a branch\n  - `dir`: The directory into which the repository will be checked out\n  - `accept_hostkey`: Whether to automatically accept the Git server's hostkey on the first connection.\n\nYou can also control whether a `composer install` is run after the git clone is finished using the following variable:\n\n    drupal_deploy_composer_install: true\n\n### Build a project from a Drush Make file\n\n    drupal_build_makefile: false\n    drush_makefile_path: \"/path/to/drupal.make.yml\"\n    drush_make_options: \"--no-gitinfofile\"\n\nSet this to `true` and `drupal_build_composer*` to `false` if you would like to build a Drupal make file with Drush.\n\n### Build a project from a Composer file\n\n    drupal_build_composer: false\n    drupal_composer_path: \"/path/to/drupal.composer.json\"\n    drupal_composer_install_dir: \"/var/www/drupal\"\n    drupal_composer_no_dev: true\n    drupal_composer_dependencies:\n      - \"drush/drush:^10.1\"\n\nSet `drupal_build_makefile` to `false` and this to `true` if you are using a Composer-based site deployment strategy. The other options should be relatively straightforward.\n\n    drupal_composer_bin_dir: \"vendor/bin\"\n\nIf you set the `bin-dir` in your project's `composer.json` file to a value other than `vendor/bin`, override this variable with the same directory path.\n\n### Create a new project using `composer create-project` (Composer)\n\n    drupal_build_composer_project: true\n    drupal_composer_project_package: \"drupal/recommended-project:^9@dev\"\n    drupal_composer_project_options: \"--prefer-dist --stability dev --no-interaction\"\n\nSet this to `true` and `drupal_build_makefile`, `drupal_build_composer` to `false` if you are using Composer's `create-project` as a site deployment strategy.\n\n### Required Drupal site settings\n\n    drupal_core_path: \"{{ drupal_deploy_dir }}/web\"\n    drupal_core_owner: \"{{ ansible_ssh_user | default(ansible_env.SUDO_USER, true) | default(ansible_env.USER, true) | default(ansible_user_id) }}\"\n    drupal_core_owner_become: false\n\nThe path to Drupal's root, along with the ownership properties. If you are not running Ansible as the user that should have ownership over the core path, specify the desired system user in `drupal_core_owner` and set `drupal_core_owner_become: true`.\n\n    drupal_db_user: drupal\n    drupal_db_password: drupal\n    drupal_db_name: drupal\n    drupal_db_backend: mysql\n    drupal_db_host: \"127.0.0.1\"\n\nRequired Drupal settings. When used in a production or shared environment, you should update at least the `drupal_db_password` and use a secure password.\n\n### Drupal site installation options\n\n    drupal_install_site: true\n\nSet this to `false` if you don't need to install Drupal (using the `drupal_*` settings below), but instead copy down a database (e.g. using `drush sql-sync`).\n\n    drupal_domain: \"drupaltest.test\"\n    drupal_site_name: \"Drupal\"\n    drupal_install_profile: standard\n    drupal_site_install_extra_args: []\n    drupal_enable_modules: []\n    drupal_account_name: admin\n    drupal_account_pass: admin\n\nSettings for installing a Drupal site if `drupal_install_site` is `true`. If you need to pass additional arguments to the `drush site-install` command, you can pass them in as a list to the `drupal_site_install_extra_args` variable.\n\n## Dependencies\n\nN/A\n\n## Example Playbook\n\nSee the example playbooks used for Travis CI tests (`tests/test.yml` and `tests/test-deploy.yml`) for simple examples. See also: [Drupal VM](https://www.drupalvm.com), which uses this role to set up Drupal.\n\n    - hosts: webserver\n      vars_files:\n        - vars/main.yml\n      roles:\n        - geerlingguy.apache\n        - geerlingguy.mysql\n        - geerlingguy.php-versions\n        - geerlingguy.php\n        - geerlingguy.php-mysql\n        - geerlingguy.composer\n        - geerlingguy.drush\n        - geerlingguy.drupal\n\n*Inside `vars/main.yml`*:\n\n    drupal_install_site: true\n    drupal_build_composer_project: true\n    drupal_composer_install_dir: \"/var/www/drupal\"\n    drupal_core_path: \"{{ drupal_composer_install_dir }}/web\"\n    drupal_domain: \"example.com\"\n\n## License\n\nMIT / BSD\n\n## Author Information\n\nThis role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-drupal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeerlingguy%2Fansible-role-drupal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeerlingguy%2Fansible-role-drupal/lists"}