diff --git a/files/ovsovn.service b/files/ovsovn.service index 05fc5e5..4168623 100644 --- a/files/ovsovn.service +++ b/files/ovsovn.service @@ -1,6 +1,8 @@ [Unit] Description=OpenVSwitch and OVN Controller service -After=network.target +After=network-pre.target systemd-udev-settle.service +Before=networking.service + StartLimitIntervalSec=0 [Service] diff --git a/tasks/ubuntu20.yml b/tasks/ubuntu20.yml index 58e619c..5522e45 100644 --- a/tasks/ubuntu20.yml +++ b/tasks/ubuntu20.yml @@ -53,7 +53,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 == True + when: ovn_nbctl_exists.stat.exists == True and use_ovn==true #- debug: msg={{ovn_nbctl_md5_value}} #- debug: msg={{ovn_nbctl_exists}} @@ -61,13 +61,13 @@ - name: "Set fact to true if the source file does not exist" set_fact: force_new_ovn_download: True - when: ovn_nbctl_exists.stat.exists == False + when: ovn_nbctl_exists.stat.exists == False and use_ovn==true - debug: msg="Installing OVN" - when: force_new_ovn_download == True + when: force_new_ovn_download == True and use_ovn==true - debug: msg="NOT Installing OVN, MD5 sum matches" - when: force_new_ovn_download == False + when: force_new_ovn_download == False and use_ovn==true - name: "Copy OVN binaries" copy: @@ -75,11 +75,11 @@ dest: "/tmp/{{item}}" with_items: - ovn_20.06.0-1_amd64.deb - when: force_new_ovn_download == True + when: force_new_ovn_download == True and use_ovn==true - name: "Install packages" apt: deb: "{{ item }}" with_items: - "/tmp/ovn_20.06.0-1_amd64.deb" - when: force_new_ovn_download == True + when: force_new_ovn_download == True and use_ovn==true