Commit e801a000 authored by Joanne Hugé's avatar Joanne Hugé

playbook/upgrader: remove useless playbook_sha256sum fact

ansible will exit if there is a sha256sum mismatch, no
need to check rc code
parent 1d4e86b0
...@@ -61,19 +61,18 @@ ...@@ -61,19 +61,18 @@
- name: Check uncompressed archive sha256sum - name: Check uncompressed archive sha256sum
shell: cd /opt/upgrader/tmp && find . -type f ! -name 'sha256sum' -print0 | LC_ALL=C sort -z | xargs -0 sha256sum | sha256sum --check sha256sum shell: cd /opt/upgrader/tmp && find . -type f ! -name 'sha256sum' -print0 | LC_ALL=C sort -z | xargs -0 sha256sum | sha256sum --check sha256sum
register: playbook_sha256sum
- shell: cp -R /opt/upgrader/tmp /opt/upgrader/playbook - shell: cp -R /opt/upgrader/tmp /opt/upgrader/playbook
when: playbook_folder.stat.exists == False and playbook_sha256sum.rc == 0 when: playbook_folder.stat.exists == False
- stat: path=/opt/upgrader/tmp/hosts - stat: path=/opt/upgrader/tmp/hosts
register: hosts_file register: hosts_file
- shell: rm -rf /opt/upgrader/playbook-tmp - shell: rm -rf /opt/upgrader/playbook-tmp
when: hosts_file.stat.exists == True and playbook_sha256sum.rc == 0 when: hosts_file.stat.exists == True
- shell: cp -R /opt/upgrader/tmp /opt/upgrader/playbook-tmp - shell: cp -R /opt/upgrader/tmp /opt/upgrader/playbook-tmp
when: hosts_file.stat.exists == True and playbook_sha256sum.rc == 0 when: hosts_file.stat.exists == True
- name: Save new archive MD5 - name: Save new archive MD5
stat: stat:
......
6029ca6cee93708a034f9c619a945687191610d3afa64e107d1e19a1dc3fc037 - 65410415ae8c0b4439e310301f60a60eb3804b51ff1beb5b26fccae345c3534b -
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