- name: Deploy Drupal CMS
hosts: webserver
become: true
pre_tasks:
- name: Set become for PostgreSQL tasks
set_fact:
ansible_become: true
vars:
drupal_build_composer_project: true
drupal_composer_project_package: "drupal/recommended-project:^10.2"
drupal_composer_dependencies:
- "drush/drush:^11.0"
postgresql_postgres_password: "postgres"
postgresql_login_user: "postgres"
postgresql_login_password: "postgres"
postgresql_login_host: "localhost"
postgresql_users:
- name: drupal
password: drupalpass
postgresql_databases:
- name: drupal
owner: drupal
composer_path: /usr/bin/composer
drupal_domain: "drupal.local"
drupal_install_site: true
drupal_site_name: "My Drupal Site"
drupal_admin_user: admin
drupal_admin_password: adminpass
drupal_admin_email: [email protected]
drupal_db_user: drupal
drupal_db_password: drupalpass
drupal_db_name: drupal
drupal_db_backend: pgsql
roles:
- geerlingguy.nginx
- geerlingguy.postgresql
- geerlingguy.php
- geerlingguy.composer
- role: geerlingguy.drupal
become: false
vars:
ansible_user: www-data