diff options
author | Stepan Andrushko <stepanx.andrushko@intel.com> | 2018-10-31 15:58:51 +0200 |
---|---|---|
committer | Stepan Andrushko <stepanx.andrushko@intel.com> | 2019-04-19 10:41:24 +0000 |
commit | a84cbaaf620fff614a68e0cc95775c45738f14b1 (patch) | |
tree | 00dc4a51d90b437d91c2d9eaf73f6e2638f0cf15 /ansible/roles/install_samplevnf | |
parent | 37b6e13c72a5079fd0b99478a23774d05c21a04f (diff) |
Log VM OS version, Sample VNF branch/commit ID
Added debug logs to track VM, Sample VNF details during testing:
- Virtual machine OS, kernel version;
- Sample VNF branch, commit ID.
JIRA: YARDSTICK-1499
Change-Id: I243c435809d4541dfdb8c7c3466f50c5d524ac00
Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
Diffstat (limited to 'ansible/roles/install_samplevnf')
-rw-r--r-- | ansible/roles/install_samplevnf/tasks/main.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ansible/roles/install_samplevnf/tasks/main.yml b/ansible/roles/install_samplevnf/tasks/main.yml index b5d33f668..ad147b00f 100644 --- a/ansible/roles/install_samplevnf/tasks/main.yml +++ b/ansible/roles/install_samplevnf/tasks/main.yml @@ -56,3 +56,35 @@ # make executable mode: 0755 +- set_fact: + path_vnf: "{{ INSTALL_BIN_PATH }}/{{ vnf_app_names[vnf_name]}}" + +- stat: + path: "{{ path_vnf }}" + checksum_algorithm: md5 + register: path_vnf_var + +- stat: + path: "{{ path_json }}" + register: path_json_var + +- name: Fetch from remote + fetch: + src: "{{ path_json }}" + dest: "{{ path_json }}" + flat: yes + when: path_json_var.stat.exists + +- name: Read from json + set_fact: + json_vars: "{{ lookup('file', path_json) | from_json }}" + when: path_json_var.stat.exists + +- set_fact: + json_vars: "{{ json_vars | default([]) | combine({ vnf_app_names[vnf_name]: {'branch_commit': samplevnf_version, 'path_vnf': path_vnf, 'md5': path_vnf_var.stat.checksum }}) }}" + +- name: Update json file + copy: + content: "{{ json_vars | to_nice_json }}" + dest: "{{ path_json }}" + mode: 0755 |