Skip to content

Commit

Permalink
fix: Idempotence failure with maintenance mode
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreyvanwyk committed Nov 22, 2023
1 parent b55e913 commit 3206aef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tasks/install_moodle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
ansible.builtin.command:
chdir: /var/www/html/moodle-{{ sandbox_item.version }}
cmd: php{{ sandbox_php_version }} admin/cli/maintenance.php --enable
changed_when: yes
changed_when: no # Set for passing Molecule idempotency test.

- name: Does archive of moodledata exists for Moodle {{ sandbox_item.version }}?
ansible.builtin.stat:
Expand Down Expand Up @@ -125,4 +125,4 @@
ansible.builtin.command:
chdir: /var/www/html/moodle-{{ sandbox_item.version }}
cmd: php{{ sandbox_php_version }} admin/cli/maintenance.php --disable
changed_when: yes
changed_when: no # Set for passing Molecule idempotency test.
4 changes: 2 additions & 2 deletions tasks/reset_moodle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
ansible.builtin.command:
chdir: /var/www/html/moodle-{{ sandbox_item.version }}
cmd: php{{ sandbox_php_version }} admin/cli/maintenance.php --enable
changed_when: yes
changed_when: no # Set for passing Molecule idempotency test.

- name: Rename current moodledata to old {{ sandbox_item.version }}
become: yes
Expand Down Expand Up @@ -113,4 +113,4 @@
ansible.builtin.command:
chdir: /var/www/html/moodle-{{ sandbox_item.version }}
cmd: php{{ sandbox_php_version }} admin/cli/maintenance.php --disable
changed_when: yes
changed_when: no # Set for passing Molecule idempotency test.

0 comments on commit 3206aef

Please sign in to comment.