diff options
Diffstat (limited to 'tutorials/vFWDT/playbooks')
-rwxr-xr-x | tutorials/vFWDT/playbooks/darkstat | bin | 0 -> 391544 bytes | |||
-rwxr-xr-x | tutorials/vFWDT/playbooks/upgrade.sh | 6 | ||||
-rwxr-xr-x | tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml | 15 | ||||
-rwxr-xr-x | tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml | 15 | ||||
-rwxr-xr-x | tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradesoftware/site.yml | 28 |
5 files changed, 61 insertions, 3 deletions
diff --git a/tutorials/vFWDT/playbooks/darkstat b/tutorials/vFWDT/playbooks/darkstat Binary files differnew file mode 100755 index 00000000..e80f43fe --- /dev/null +++ b/tutorials/vFWDT/playbooks/darkstat diff --git a/tutorials/vFWDT/playbooks/upgrade.sh b/tutorials/vFWDT/playbooks/upgrade.sh index 0dd27d08..e7cadc10 100755 --- a/tutorials/vFWDT/playbooks/upgrade.sh +++ b/tutorials/vFWDT/playbooks/upgrade.sh @@ -19,9 +19,9 @@ #change IP addresses and upload to playbooks folder darkstat and server.py before -SINK1=10.254.184.217 -SINK2=10.254.184.210 -VFW1=10.254.184.208 +SINK1=10.254.184.195 +SINK2=10.254.184.218 +VFW1=10.254.184.196 VFW2=10.254.184.216 echo $VFW1 > vfw_mgt_ip.txt diff --git a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml new file mode 100755 index 00000000..6d6d51b6 --- /dev/null +++ b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml @@ -0,0 +1,15 @@ +--- +- hosts: vfw-sink + gather_facts: no + remote_user: ubuntu + tasks: + - debug: var="new_software_version" + failed_when: new_software_version is not defined + - debug: var="existing_software_version" + failed_when: existing_software_version is not defined + - name: Read OLD Software Version + shell: cat /opt/config/version.txt + register: old_version + become: true + - debug: var=old_version.stdout + failed_when: old_version.stdout != new_software_version diff --git a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml new file mode 100755 index 00000000..05da22a7 --- /dev/null +++ b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml @@ -0,0 +1,15 @@ +--- +- hosts: vfw-sink + gather_facts: no + remote_user: ubuntu + tasks: + - debug: var="new_software_version" + failed_when: new_software_version is not defined + - debug: var="existing_software_version" + failed_when: existing_software_version is not defined + - name: Read OLD Software Version + shell: cat /opt/config/version.txt + register: old_version + become: true + - debug: var=old_version.stdout + failed_when: old_version.stdout == new_software_version diff --git a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradesoftware/site.yml b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradesoftware/site.yml new file mode 100755 index 00000000..1a11f082 --- /dev/null +++ b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradesoftware/site.yml @@ -0,0 +1,28 @@ +--- +- hosts: vfw-sink + gather_facts: no + remote_user: ubuntu + tasks: + - debug: var="new_software_version" + failed_when: new_software_version is not defined + - debug: var="existing_software_version" + failed_when: existing_software_version is not defined + - name: Read OLD Software Version + shell: cat /opt/config/version.txt + register: old_version + become: true + - debug: var=old_version.stdout + - block: + - name: Update Software + shell: apt-get -y --force-yes -u update + args: + warn: no + - name: Upgrade Version + shell: echo {{new_software_version}} > /opt/config/version.txt + - debug: + msg: Software version has been upgraded to {{new_software_version}} + become: true + when: old_version.stdout != new_software_version + - debug: + msg: "The software version is up to date" + when: old_version.stdout == new_software_version |