Commit 67a2abce authored by Joanne Hugé's avatar Joanne Hugé

ors-amarisoft: fixup for d1e5311d

parent d1e5311d
......@@ -32,16 +32,16 @@
when: certificate.stat.exists == True
- debug:
msg: "[{{ ansible_date_time.date }} {{ ansible_date_time.time }}] License will expire on {{ license_expiration.stdout }}, current version is {{ current_version.stdout }}-{{ current_timestamp.stdout }}"
msg: "[{{ ansible_date_time.date }} {{ ansible_date_time.time }}] License will expire on {{ license_expiration.stdout }}, current version is {{ current_version.stdout }}.{{ current_timestamp.stdout }}"
when: certificate.stat.exists == True
- name: Get new amarisoft version if available
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k key-private:amarisoft 'cn==\"{{ cn }}\"' 'version<=\"{{ license_expiration.stdout }}\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' --list | grep version | cut -d\\\" -f4"
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k key-private:amarisoft 'cn==\"{{ cn }}\"' 'version<=\"{{ license_expiration.stdout }}\"' 'timestamp>=\"0\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' --list | grep version | cut -d\\\" -f4"
register: new_version
when: certificate.stat.exists == True
- name: Get new amarisoft timestamp
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k key-private:amarisoft 'cn==\"{{ cn }}\"' 'version<=\"{{ license_expiration.stdout }}\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' --list | grep timestamp | cut -d\\\" -f4"
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k key-private:amarisoft 'cn==\"{{ cn }}\"' 'version<=\"{{ license_expiration.stdout }}\"' 'timestamp>=\"0\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' --list | grep timestamp | cut -d\\\" -f4"
register: new_timestamp
when: (certificate.stat.exists == True) and (new_version.stdout != "")
......@@ -50,7 +50,7 @@
when: (certificate.stat.exists == True) and (new_version.stdout != "")
- name: Download nonce to decrypt new amarisoft version
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k file-private:amarisoft 'version<=\"{{ license_expiration.stdout }}\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' --list | grep nonce | cut -d\\\" -f4 > {{ install_folder }}/download/nonce"
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k file-private:amarisoft 'version<=\"{{ license_expiration.stdout }}\"' 'timestamp>=\"0\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' --list | grep nonce | cut -d\\\" -f4 > {{ install_folder }}/download/nonce"
register: nonce
when: (certificate.stat.exists == True) and (new_version.stdout != "")
......@@ -58,11 +58,11 @@
when: (certificate.stat.exists == True) and (new_version.stdout != "")
- name: Download new amarisoft version
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k file-private:amarisoft 'version<=\"{{ license_expiration.stdout }}\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' > {{ install_folder }}/download/amarisoft.tar.gz.enc"
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k file-private:amarisoft 'version<=\"{{ license_expiration.stdout }}\"' 'timestamp>=\"0\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' > {{ install_folder }}/download/amarisoft.tar.gz.enc"
when: (certificate.stat.exists == True) and (new_version.stdout != "")
- name: Download encrypted symmetric key for new amarisoft version
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k key-private:amarisoft 'cn==\"{{ cn }}\"' 'version<=\"{{ license_expiration.stdout }}\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' > {{ install_folder }}/download/symmetric_key.bin.enc"
shell: "networkcache-download -c /opt/amarisoft/shacache.cfg -k key-private:amarisoft 'cn==\"{{ cn }}\"' 'version<=\"{{ license_expiration.stdout }}\"' 'timestamp>=\"0\"' 'version>>\"{{ current_version.stdout }}\"' 'timestamp>>\"{{ current_timestamp.stdout }}\"' > {{ install_folder }}/download/symmetric_key.bin.enc"
when: (certificate.stat.exists == True) and (new_version.stdout != "")
- name: Create directory if it does not exist
......
923f60fc3e28c6ac4828dbbf9ac09e5e255d46f9c63619e060bf4cced6cdd45f -
e0cd6f14345f9b3557ed3e7ae727c798acd3d89c92e3eff20d9742dbe77bbe85 -
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