aboutsummaryrefslogtreecommitdiffstats
path: root/tutorials/vFWDT/playbooks/vfw-sink/latest
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2020-04-26 23:49:55 +0200
committerLukasz Rajewski <lukasz.rajewski@orange.com>2020-04-27 12:49:11 +0200
commit6610dc1180d0dfbe30a737306d0f059b463aeb26 (patch)
tree1287d8b08f82e4aad4ca3c0df56164bc29ecfc6d /tutorials/vFWDT/playbooks/vfw-sink/latest
parent48f05c0565702f4b1bf13f934323a4cef20206a3 (diff)
vFWDT tutorial fixes after integration tests
Modification in test files, including configuration and workflow files. Change-Id: I6d9eaf4355a151fa20f1b5d4ea8a025cbcb3d70f Issue-ID: INT-1465 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com>
Diffstat (limited to 'tutorials/vFWDT/playbooks/vfw-sink/latest')
-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
3 files changed, 18 insertions, 4 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