diff --git a/.github/workflows/ce-deploy-test-drupal8.yml b/.github/workflows/ce-deploy-test-drupal8.yml index ec9909a9..5ebfebfa 100644 --- a/.github/workflows/ce-deploy-test-drupal8.yml +++ b/.github/workflows/ce-deploy-test-drupal8.yml @@ -29,7 +29,7 @@ jobs: sudo mv ./mkcert /usr/local/bin && cd ../ sudo chmod +x /usr/local/bin/mkcert rm -Rf mkcert - curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/1.x/install.sh | /bin/sh -s -- linux + curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/2.x/install.sh | /bin/sh -s -- --platform linux # Uses the ce-dev stack to run a test Drupal deploy - name: Run a test ce-dev deploy with Drupal 8 diff --git a/.github/workflows/ce-deploy-test-drupal9.yml b/.github/workflows/ce-deploy-test-drupal9.yml index afaaca7a..c16bff5f 100644 --- a/.github/workflows/ce-deploy-test-drupal9.yml +++ b/.github/workflows/ce-deploy-test-drupal9.yml @@ -29,7 +29,7 @@ jobs: sudo mv ./mkcert /usr/local/bin && cd ../ sudo chmod +x /usr/local/bin/mkcert rm -Rf mkcert - curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/1.x/install.sh | /bin/sh -s -- linux + curl -sL https://raw.githubusercontent.com/codeenigma/ce-dev/2.x/install.sh | /bin/sh -s -- --platform linux # Uses the ce-dev stack to run a test Drupal deploy - name: Run a test ce-dev deploy with Drupal 9 diff --git a/ce-dev/ce-dev.compose.yml b/ce-dev/ce-dev.compose.yml index c7ff7a0e..742eb550 100644 --- a/ce-dev/ce-dev.compose.yml +++ b/ce-dev/ce-dev.compose.yml @@ -11,6 +11,8 @@ services: x-ce_dev: {} volumes: - ../:/home/ce-dev/ce-deploy + platform: linux/amd64 + cgroup: host web: image: codeenigma/ce-dev-1.x x-ce_dev: @@ -21,7 +23,11 @@ services: - 443 volumes: - ../ce-dev/build/:/home/ce-dev/deploy/live.local:delegated + platform: linux/amd64 + cgroup: host db: image: mariadb environment: MYSQL_ROOT_PASSWORD: ce-dev + platform: linux/amd64 + cgroup: host diff --git a/roles/_exit/tasks/main.yml b/roles/_exit/tasks/main.yml index 640f3a18..981986e0 100644 --- a/roles/_exit/tasks/main.yml +++ b/roles/_exit/tasks/main.yml @@ -4,6 +4,7 @@ ansible.builtin.command: > aws autoscaling resume-processes --auto-scaling-group-name {{ aws_asg.name }} --region {{ aws_asg.region }} delegate_to: localhost + run_once: true when: - aws_asg.name is defined - aws_asg.name | length > 0 diff --git a/roles/_init/tasks/main.yml b/roles/_init/tasks/main.yml index 6f0cd830..445655c5 100644 --- a/roles/_init/tasks/main.yml +++ b/roles/_init/tasks/main.yml @@ -160,6 +160,7 @@ ansible.builtin.command: > aws autoscaling suspend-processes --auto-scaling-group-name {{ aws_asg.name }} --scaling-processes {{ aws_asg.suspend_processes }} --region {{ aws_asg.region }} delegate_to: localhost + run_once: true when: - aws_asg.name is defined - aws_asg.name | length > 0 diff --git a/roles/deploy_code/tasks/cleanup.yml b/roles/deploy_code/tasks/cleanup.yml index 449c1103..8d0d25b7 100644 --- a/roles/deploy_code/tasks/cleanup.yml +++ b/roles/deploy_code/tasks/cleanup.yml @@ -84,6 +84,7 @@ ansible.builtin.stat: path: "{{ build_base_path }}/deploy.sqsh" register: _deploy_code_mount_image + run_once: true - name: Copy previous SquashFS image to shared mount point in case of rollback. ansible.builtin.copy: diff --git a/roles/npm/tasks/main.yml b/roles/npm/tasks/main.yml index 09487313..eacba6c2 100644 --- a/roles/npm/tasks/main.yml +++ b/roles/npm/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Perform NPM steps. - command: + ansible.builtin.command: cmd: "{{ npm.executor }} {{ npm_command }}" chdir: "{{ npm.working_dir }}" with_items: "{{ npm.commands }}" @@ -9,7 +9,7 @@ when: deploy_operation == 'deploy' - name: Generate additional templates. - template: + ansible.builtin.template: src: "{{ template.src }}" dest: "{{ deploy_path }}/{{ template.dest }}" with_items: "{{ npm.templates }}" @@ -20,7 +20,7 @@ - deploy_operation == 'deploy' - name: Create additional symlinks. - file: + ansible.builtin.file: src: "{{ link.src }}" dest: "{{ deploy_path }}/{{ link.dest }}" state: link @@ -30,4 +30,4 @@ loop_var: link when: - npm.symlinks | length - - deploy_operation == 'deploy' \ No newline at end of file + - deploy_operation == 'deploy' diff --git a/roles/sync/database_sync/database_sync-mysql/tasks/sync.yml b/roles/sync/database_sync/database_sync-mysql/tasks/sync.yml index 6b9d7dcd..ec36623b 100644 --- a/roles/sync/database_sync/database_sync-mysql/tasks/sync.yml +++ b/roles/sync/database_sync/database_sync-mysql/tasks/sync.yml @@ -98,7 +98,7 @@ - not database.source.fresh_db - name: Register source database host. - set_fact: + ansible.builtin.set_fact: mysql_sync_source_database_host: "{{ mysql_host_info_grep.stdout.split('=')[1] }}" when: - not database.source.fresh_db