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
62 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
f076147
Stop ce-deploy trying to delete from read-only SquashFS mount.
gregharvey Jun 15, 2022
622f686
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 15, 2022
3ced700
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 15, 2022
6c7d2c9
Formatting error, these special jinja2 things are not filters - no sp…
gregharvey Jun 15, 2022
e53308e
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 15, 2022
fec8f01
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 15, 2022
5e145d4
Reloading services to make sure mounting doesn't fail.
gregharvey Jun 16, 2022
3ab9a57
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 16, 2022
57a5cea
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 16, 2022
57ed6e3
Picking more sensible loop var name.
gregharvey Jun 16, 2022
bb185a4
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 16, 2022
1b66af2
Moving to shell for mount check and fixing jinja2 filter names.
gregharvey Jun 16, 2022
dbe45ca
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 16, 2022
74466c0
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 16, 2022
9db2899
Trying with the posix mount module instead of command.
gregharvey Jun 16, 2022
e77e0e5
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 16, 2022
38b69e5
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 16, 2022
169a5f7
Working through user/sudo issues.
gregharvey Jun 16, 2022
ba6cf37
Merge branch 'devel' into squashfs-PR-devel
gregharvey Jun 16, 2022
bfeeb4f
Merge branch 'squashfs' into squashfs-PR-devel
gregharvey Jun 16, 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
68 changes: 29 additions & 39 deletions roles/deploy_code/tasks/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,55 +104,45 @@
- deploy_code.mount_sync | length > 1
- deploy_code.mount_type == "squashfs"

#- name: Check if we have a mount already.
# ansible.builtin.shell:
# 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: Check if we have a mount already.
ansible.builtin.shell:
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: Unmount existing SquashFS image.
ansible.posix.mount:
path: "{{ deploy_base_path }}"
state: unmounted
ansible.builtin.command:
cmd: "umount -l {{ deploy_base_path }}"
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 is succeeded

#- name: Reload any services that might be keeping the loop device busy.
# ansible.builtin.service:
# name: "{{ www_service }}"
# state: reloaded
# with_items: "{{ deploy_code.services }}"
# loop_control:
# loop_var: www_service
# 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 is succeeded
# - deploy_code.services | length > 0
- _mount_check is succeeded

- name: Reload any services that might be keeping the loop device busy.
ansible.builtin.service:
name: "{{ www_service }}"
state: reloaded
with_items: "{{ deploy_code.services }}"
loop_control:
loop_var: www_service
become: true
when:
- deploy_code.mount_sync is defined
- deploy_code.mount_sync | length > 1
- deploy_code.mount_type == "squashfs"
- _mount_check is succeeded
- deploy_code.services | length > 0

- name: Mount new SquashFS image.
ansible.posix.mount:
#cmd: "mount {{ build_base_path }}/deploy.sqsh {{ deploy_base_path }} -t squashfs -o loop"
src: "{{ build_base_path }}/deploy.sqsh"
path: "{{ deploy_base_path }}"
state: mounted
opts: loop
fstype: squashfs
boot: false
ansible.builtin.command:
cmd: "mount {{ build_base_path }}/deploy.sqsh {{ deploy_base_path }} -t squashfs -o loop"
become: true
become_user: "{{ deploy_user }}"
when:
- deploy_code.mount_sync is defined
- deploy_code.mount_sync | length > 1
Expand Down