summaryrefslogtreecommitdiffstats
path: root/tutorials/vFWDT/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'tutorials/vFWDT/playbooks')
-rw-r--r--tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/distributetrafficcheck/site.yml2
-rwxr-xr-xtutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml2
-rwxr-xr-xtutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml18
-rw-r--r--tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetraffic/site.yml2
-rw-r--r--tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetrafficcheck/site.yml2
5 files changed, 20 insertions, 6 deletions
diff --git a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/distributetrafficcheck/site.yml b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/distributetrafficcheck/site.yml
index 5eb72143..d7b5f442 100644
--- a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/distributetrafficcheck/site.yml
+++ b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/distributetrafficcheck/site.yml
@@ -1,5 +1,5 @@
---
-- hosts: vfw-sink
+- hosts: vFWDT
gather_facts: no
remote_user: ubuntu
vars:
diff --git a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml
index 559420a8..13e5be97 100755
--- a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml
+++ b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradepostcheck/site.yml
@@ -1,5 +1,5 @@
---
-- hosts: vfw-sink
+- hosts: vFWDT
gather_facts: no
remote_user: ubuntu
tasks:
diff --git a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml
index 2ad56da7..daa7da82 100755
--- a/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml
+++ b/tutorials/vFWDT/playbooks/vfw-sink/latest/ansible/upgradeprecheck/site.yml
@@ -1,5 +1,5 @@
---
-- hosts: vfw-sink
+- hosts: vFWDT
gather_facts: no
remote_user: ubuntu
tasks:
@@ -7,9 +7,23 @@
failed_when: new_software_version is not defined
- debug: var="existing_software_version"
failed_when: existing_software_version is not defined
+ - name: Check if version is known
+ stat:
+ path: /opt/config/version.txt
+ register: version_file
+ - name: Default version
+ shell: echo '{{existing_software_version}}' >> /opt/config/version.txt
+ when: version_file.stat.exists == false
+ become: true
- name: Read OLD Software Version
shell: cat /opt/config/version.txt
register: old_version
become: true
- - debug: var=old_version.stdout
+ - name: Check existing version
+ debug:
+ msg: "{{old_version.stdout}} == {{existing_software_version}}"
+ failed_when: old_version.stdout != existing_software_version
+ - name: Check if upgrade is needed
+ debug:
+ msg: "{{old_version.stdout}} -> {{new_software_version}}"
failed_when: old_version.stdout == new_software_version
diff --git a/tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetraffic/site.yml b/tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetraffic/site.yml
index 90b34974..69d85f64 100644
--- a/tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetraffic/site.yml
+++ b/tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetraffic/site.yml
@@ -1,5 +1,5 @@
---
-- hosts: vpgn
+- hosts: vFWDT
gather_facts: no
remote_user: ubuntu
tasks:
diff --git a/tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetrafficcheck/site.yml b/tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetrafficcheck/site.yml
index 36e36249..6b86646d 100644
--- a/tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetrafficcheck/site.yml
+++ b/tutorials/vFWDT/playbooks/vpgn/latest/ansible/distributetrafficcheck/site.yml
@@ -1,5 +1,5 @@
---
-- hosts: vpgn
+- hosts: vFWDT
gather_facts: no
remote_user: ubuntu
tasks: