Ansible: prevent showing changed status when not changed
This commit is contained in:
parent
922ac14e6b
commit
b83baa4c26
|
@ -13,16 +13,21 @@
|
||||||
command: '{{ release_drush_path }} updatedb -y'
|
command: '{{ release_drush_path }} updatedb -y'
|
||||||
args:
|
args:
|
||||||
chdir: '{{ release_web_path }}'
|
chdir: '{{ release_web_path }}'
|
||||||
|
register: update_database_result
|
||||||
|
changed_when: "'No pending updates' not in update_database_result.stderr"
|
||||||
|
|
||||||
- name: Import configuration
|
- name: Import configuration
|
||||||
command: '{{ release_drush_path }} config-import -y'
|
command: '{{ release_drush_path }} config-import -y'
|
||||||
args:
|
args:
|
||||||
chdir: '{{ release_web_path }}'
|
chdir: '{{ release_web_path }}'
|
||||||
|
register: config_import_result
|
||||||
|
changed_when: "'There are no changes to import' not in config_import_result.stderr"
|
||||||
|
|
||||||
- name: Rebuild cache
|
- name: Rebuild cache
|
||||||
command: '{{ release_drush_path }} cache-rebuild'
|
command: '{{ release_drush_path }} cache-rebuild'
|
||||||
args:
|
args:
|
||||||
chdir: '{{ release_web_path }}'
|
chdir: '{{ release_web_path }}'
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: Generate front-end assets
|
- name: Generate front-end assets
|
||||||
command: |
|
command: |
|
||||||
|
@ -51,3 +56,4 @@
|
||||||
command: '{{ release_drush_path }} cache-rebuild'
|
command: '{{ release_drush_path }} cache-rebuild'
|
||||||
args:
|
args:
|
||||||
chdir: '{{ release_web_path }}'
|
chdir: '{{ release_web_path }}'
|
||||||
|
changed_when: false
|
||||||
|
|
Loading…
Reference in a new issue