Move all files to deploying-php-ansible-ansistrano/demo/

This commit is contained in:
Oliver Davies 2025-10-03 22:04:20 +01:00
parent 986ba5097d
commit ad3af7d318
214 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,41 @@
---
- name: Install Drupal
command: >
{{ release_drush_path }}
site-install -y
--account-pass=admin123
--existing-config
chdir={{ release_drupal_path }}
when: drupal_install|bool
- name: Post-update tasks
when: not drupal_install|bool
block:
- name: Clear Drush cache
command: >
{{ release_drush_path }}
cache-clear drush
chdir={{ release_drupal_path }}
changed_when: false
- name: Run database updates
command: >
{{ release_drush_path }}
updatedb -y
chdir={{ release_drupal_path }}
register: update_database_output
changed_when: "'No pending updates' not in update_database_output.stderr"
- name: Import configuration
command: >
{{ release_drush_path }}
config-import -y
chdir={{ release_drupal_path }}
register: config_import_output
changed_when: "'There are no changes to import' not in config_import_output.stderr"
- name: Rebuild cache
command: >
{{ release_drush_path }} cache-rebuild
chdir={{ release_drupal_path }}
changed_when: false

View file

@ -0,0 +1,22 @@
---
- name: Update directory permissions
file:
path: '{{ item.path }}'
mode: '{{ item.mode }}'
state: directory
owner: vagrant
group: www-data
recurse: true
loop:
- path: '{{ release_drupal_path }}'
mode: u=rwX,g=rX,o=
- path: '{{ ansistrano_shared_path }}/{{ project_web_root }}/sites/default/files'
mode: ug=rwX,o=
- name: Update file permissions
file:
path: '{{ release_drupal_path }}/sites/default/settings.php'
mode: ug=r,o=
state: file
owner: vagrant
group: www-data

View file

@ -0,0 +1,10 @@
---
- name: Install Composer dependencies
composer:
command: install
optimize_autoloader: true
working_dir: '{{ ansistrano_release_path.stdout }}'
- name: Generate settings.php file
include_role:
name: opdavies.drupal_settings_files