Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3ccfe51
Defer nightly backups, disable ASG processes during syncs and run syn…
EmlynK Jan 20, 2022
a54c09c
Added deploy.yml examples for Drupal 9 and Localgov. Updated tests (#97)
DionisioFG Mar 10, 2022
223a3b5
Adding a new SimpleSAMLphp meta role. (#100)
gregharvey Mar 31, 2022
32843d5
Allowing users to set cachetool version properly. (#102)
gregharvey Apr 13, 2022
91ea64e
Deploy ami pr 1.x (#106)
gregharvey Apr 14, 2022
371b6b9
Making the MySQL dump command for routine back-ups less aggressive. (…
gregharvey Apr 20, 2022
a9cc7ad
Fix database backups pr 1.x (#109)
gregharvey Apr 20, 2022
4c4c3ad
Fix MySQL backup deferral. (#110)
EmlynK Apr 22, 2022
029848d
Files recurse fix pr 1.x (#112)
EmlynK Apr 26, 2022
b71fa83
Improve multisite support (#115)
EmlynK Apr 29, 2022
c933dc8
Static credentials handling fix pr 1.x (#119)
EmlynK May 23, 2022
b6ea020
Making contents of deploy tar 'ownerless'. (#117)
gregharvey May 31, 2022
1c2b206
Implement file syncing (#124)
EmlynK Jun 7, 2022
1cd0ed0
Create Drupal-specific sync roles (#128)
EmlynK Jun 8, 2022
904033f
Fixing GRANT query for MySQL > 8.0. (#131)
gregharvey Jun 10, 2022
94715d8
Use IF NOT EXISTS when creating database user as that command fails i…
EmlynK Jun 13, 2022
20774f6
Adding SquashFS option to syncing.
gregharvey Jun 13, 2022
a684f74
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 13, 2022
53e6443
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 13, 2022
7f3e750
Make 'tarball' the default mount type so nothing existing breaks.
gregharvey Jun 13, 2022
f857383
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 13, 2022
2ec37f2
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 13, 2022
0b17bb5
Altering deploy_path so we can build in another location for SquashFS…
gregharvey Jun 14, 2022
eb54cb9
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 14, 2022
dcdf35f
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 14, 2022
0b380de
Ensuring the build dir exists if doing a SquashFS build.
gregharvey Jun 14, 2022
57f41a2
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 14, 2022
7d8a9ac
Force symlink creation as the deploy dir may not exist yet.
gregharvey Jun 14, 2022
fce73e8
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 14, 2022
085d709
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 14, 2022
307ac67
Running mount commands with sudo.
gregharvey Jun 15, 2022
bc90244
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 15, 2022
062afb9
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 15, 2022
4424413
Tweaking link command and destination for live links.
gregharvey Jun 15, 2022
874faa0
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 15, 2022
2884743
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 15, 2022
7e39641
Slight bug in link path handling for SquashFS.
gregharvey Jun 15, 2022
a421ba0
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 15, 2022
ca67307
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 15, 2022
2bb6459
Checking for existing mount and using remount operation.
gregharvey Jun 15, 2022
c219cdb
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 15, 2022
6c7c4ed
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions roles/deploy_code/tasks/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
- deploy_code.mount_type == "tarball"
run_once: true

- name: Ensure older SquashFS images are deleted.
ansible.builtin.file:
path: "{{ build_base_path }}/deploy.sqsh"
state: absent
when:
- deploy_code.mount_sync is defined
- deploy_code.mount_sync | length > 1
- deploy_code.mount_type == "squashfs"
run_once: true

- name: Create a SquashFS image of the deployed codebases.
ansible.builtin.command:
cmd: "mksquashfs {{ build_base_path }} /tmp/{{ project_name }}_{{ build_type }}.sqsh"
Expand Down Expand Up @@ -74,15 +84,26 @@
- deploy_code.mount_sync | length > 1
- deploy_code.mount_type == "squashfs"

- name: Unmount existing SquashFS image.
- name: Check if we have a mount already.
ansible.builtin.command:
cmd: "mount | grep {{ deploy_base_path }}"
ignore_errors: true
register: _mount_check
when:
- deploy_code.mount_sync is defined
- deploy_code.mount_sync | length > 1
- deploy_code.mount_type == "squashfs"

- name: Remount existing SquashFS image.
ansible.builtin.command:
cmd: "umount --force {{ deploy_base_path }}"
cmd: "mount {{ build_base_path }}/deploy.sqsh {{ deploy_base_path }} -t squashfs -o remount"
become: true
become_user: "{{ deploy_user }}"
when:
- deploy_code.mount_sync is defined
- deploy_code.mount_sync | length > 1
- deploy_code.mount_type == "squashfs"
- _mount_check | success

- name: Mount new SquashFS image.
ansible.builtin.command:
Expand All @@ -93,6 +114,7 @@
- deploy_code.mount_sync is defined
- deploy_code.mount_sync | length > 1
- deploy_code.mount_type == "squashfs"
- _mount_check | failed

- name: Trigger an infrastructure rebuild.
ansible.builtin.include_role:
Expand Down