From 6610dc1180d0dfbe30a737306d0f059b463aeb26 Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Sun, 26 Apr 2020 23:49:55 +0200 Subject: 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 --- .../latest/ansible/distributetrafficcheck/site.yml | 2 +- .../vfw-sink/latest/ansible/upgradepostcheck/site.yml | 2 +- .../vfw-sink/latest/ansible/upgradeprecheck/site.yml | 18 ++++++++++++++++-- .../vpgn/latest/ansible/distributetraffic/site.yml | 2 +- .../latest/ansible/distributetrafficcheck/site.yml | 2 +- 5 files changed, 20 insertions(+), 6 deletions(-) (limited to 'tutorials/vFWDT/playbooks') 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: -- cgit 1.2.3-korg search'/>
blob: 4f2fb9877e92016fec28c421e71e922a3a4d2642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40