diff --git a/tasks/ubuntu18.yml b/tasks/ubuntu18.yml index 4f1a140..f7b3718 100644 --- a/tasks/ubuntu18.yml +++ b/tasks/ubuntu18.yml @@ -1,4 +1,3 @@ - - name: set ovsdb_server_md5_value fact set_fact: ovsdb_server_md5_value: "ffd9ba2a6b3da6108d7eb97c70e51761" @@ -7,13 +6,11 @@ set_fact: ovn_nbctl_md5_value: "031e770fd969617c221b156726c2f1dc" - - name: "Set fact to true if the source file exists but the MD5 sum does not match" set_fact: force_new_ovs_download: "{{ ovsdb_server_exists.stat.checksum != ovsdb_server_md5_value }}" when: ovsdb_server_exists.stat.exists - - name: "Set fact to true if the source file does not exist" set_fact: force_new_ovs_download: True @@ -27,7 +24,7 @@ debug: msg="NOT Installing OpenVSwitch, MD5 sum matches" when: not force_new_ovs_download -- name: "Copy OVN binaries" +- name: "Copy OpenVSwitch packages" copy: src: "ubuntu18/{{ item }}" dest: "/tmp/{{ item }}" @@ -38,9 +35,7 @@ when: force_new_ovs_download - - -- name: "Install packages" +- name: "Install OpenVSwitch packages" apt: deb: "{{ item }}" with_items: @@ -59,7 +54,7 @@ - name: "Set fact to true if the source file exists but the MD5 sum does not match" set_fact: force_new_ovn_download: "{{ ovn_nbctl_exists.stat.checksum != ovn_nbctl_md5_value }}" - when: ovn_nbctl_exists.stat.exists + when: ovn_nbctl_exists.stat.exists and use_ovn #- debug: msg={{ovn_nbctl_md5_value}} #- debug: msg={{ovn_nbctl_exists}} @@ -67,13 +62,13 @@ - name: "Set fact to true if the source file does not exist" set_fact: force_new_ovn_download: True - when: not ovn_nbctl_exists.stat.exists + when: not ovn_nbctl_exists.stat.exists and use_ovn - debug: msg="Installing OVN" - when: force_new_ovn_download + when: force_new_ovn_download and use_ovn - debug: msg="NOT Installing OVN, MD5 sum matches" - when: not force_new_ovn_download + when: not force_new_ovn_download and use_ovn - name: "Copy OVN binaries" copy: @@ -81,11 +76,11 @@ dest: "/tmp/{{ item }}" with_items: - ovn_20.09.0-1_amd64.deb - when: force_new_ovn_download + when: force_new_ovn_download and use_ovn - name: "Install packages" apt: deb: "{{ item }}" with_items: - "/tmp/ovn_20.09.0-1_amd64.deb" - when: force_new_ovn_download + when: force_new_ovn_download and use_ovn