Commit 060ea7ea authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

remove ansible_check_mode variable breaking old ansible versions

parent 8724d0f9
......@@ -43,7 +43,6 @@
- name: Update playbook md5
shell: echo {{ archive.stat.md5 }} > /opt/upgrader/next-upgrade-signature
when: not ansible_check_mode
- name: Stat Current Upgrade Signature
file: path=/opt/upgrader/current-upgrade-signature state=touch mode="0666"
......@@ -60,7 +59,7 @@
- name: Do upgrade
shell: ansible-playbook {{ upgrader_playbook }} -i hosts 2>>/opt/upgrader/latest_upgrade.log >> /opt/upgrader/latest_upgrade.log
when: not ansible_check_mode and (upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
when: (upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
args:
chdir: /opt/upgrader/playbook-tmp/
......@@ -73,9 +72,9 @@
- name: Upgrade Current Upgrade Signature
shell: cat /opt/upgrader/next-upgrade-signature > /opt/upgrader/current-upgrade-signature
when: not ansible_check_mode and (upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
when: (upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
- shell: echo {{ ansible_date_time.epoch }} > /opt/upgrader/last-upgrade
when: not ansible_check_mode and (upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int )
when: (upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int )
- include: remove-legacy.yml
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment