diff --git a/tasks/main.yml b/tasks/main.yml index 12133bb5..1d4a9d86 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -40,15 +40,30 @@ - nova-virt-detect - include: nova_pre_install.yml + tags: + - nova-install + - include: nova_install.yml + tags: + - nova-install + - include: nova_post_install.yml + tags: + - nova-config + - include: nova_init_common.yml + tags: + - nova-config - include: nova_db_setup.yml when: inventory_hostname == groups['nova_api_os_compute'][0] + tags: + - nova-config - include: nova_service_setup.yml when: inventory_hostname == groups['nova_api_os_compute'][0] + tags: + - nova-config - include: nova_compute.yml when: inventory_hostname in groups['nova_compute'] diff --git a/tasks/nova_compute.yml b/tasks/nova_compute.yml index 81a17e94..ea22d373 100644 --- a/tasks/nova_compute.yml +++ b/tasks/nova_compute.yml @@ -24,7 +24,13 @@ - include: nova_compute_ironic.yml when: nova_virt_type == 'ironic' + tags: + - nova-install - include: nova_compute_key_populate.yml + tags: + - nova-config - include: nova_compute_key_distribute.yml + tags: + - nova-config \ No newline at end of file diff --git a/tasks/nova_compute_kvm.yml b/tasks/nova_compute_kvm.yml index 63dcfe9d..7a4f63ea 100644 --- a/tasks/nova_compute_kvm.yml +++ b/tasks/nova_compute_kvm.yml @@ -14,6 +14,8 @@ # limitations under the License. - include: nova_compute_kvm_install.yml + tags: + - nova-config - name: Add nova user to libvirtd group user: @@ -21,12 +23,14 @@ groups: "{{ libvirt_group }}" append: "yes" tags: + - nova-install - nova-libvirt - name: Ensure kvm permissions command: "udevadm trigger" changed_when: false tags: + - nova-config - nova-kvm - name: Set libvirtd config @@ -38,6 +42,7 @@ mode: 0644 notify: Restart libvirt-bin tags: + - nova-config - nova-kvm - nova-libvirt @@ -53,6 +58,7 @@ or nova_network_type == 'calico' notify: Restart libvirt-bin tags: + - nova-config - nova-kvm - nova-libvirt @@ -67,6 +73,7 @@ - ansible_pkg_mgr == 'apt' notify: Restart libvirt-bin tags: + - nova-config - nova-kvm - nova-libvirt @@ -81,6 +88,7 @@ - ansible_pkg_mgr == 'yum' notify: Restart libvirt-bin tags: + - nova-config - nova-kvm - nova-libvirt @@ -95,11 +103,19 @@ - ansible_pkg_mgr == 'yum' notify: Restart libvirt-bin tags: + - nova-config - nova-kvm - nova-libvirt - include: nova_disable_smt.yml when: - ansible_architecture == 'ppc64le' + tags: + - nova-config - include: nova_compute_kvm_virsh_net_remove.yml + tags: + - nova-config + - nova-kvm + - nova-libvirt + - nova-kvm-virsh-net \ No newline at end of file diff --git a/tasks/nova_compute_kvm_virsh_net_remove.yml b/tasks/nova_compute_kvm_virsh_net_remove.yml index 873e4ba1..91a093dc 100644 --- a/tasks/nova_compute_kvm_virsh_net_remove.yml +++ b/tasks/nova_compute_kvm_virsh_net_remove.yml @@ -17,21 +17,12 @@ shell: "virsh net-list | awk '/default/'" changed_when: false register: default_net - tags: - - nova-kvm - - nova-kvm-virsh-net - name: Disable libvirt default network command: "virsh net-autostart default --disable" failed_when: false when: default_net.stdout|search('default') - tags: - - nova-kvm - - nova-kvm-virsh-net - name: Destroy libvirt default network command: "virsh net-destroy default" when: default_net.stdout|search('default') - tags: - - nova-kvm - - nova-kvm-virsh-net diff --git a/tasks/nova_compute_lxd.yml b/tasks/nova_compute_lxd.yml index d3162e98..51f6004b 100644 --- a/tasks/nova_compute_lxd.yml +++ b/tasks/nova_compute_lxd.yml @@ -14,6 +14,8 @@ # limitations under the License. - include: nova_compute_lxd_install.yml + tags: + - nova-install - name: Add nova user to lxd group user: @@ -22,6 +24,7 @@ append: "yes" tags: - nova-lxd + - nova-install - name: Place lxd config script template: @@ -33,9 +36,11 @@ register: lxd_init_script tags: - nova-lxd + - nova-config - name: Configure lxd init command: "{{ nova_system_home_folder }}/lxd-init.sh" when: lxd_init_script | changed tags: - nova-lxd + - nova-config diff --git a/tasks/nova_compute_lxd_install.yml b/tasks/nova_compute_lxd_install.yml index 0db2644b..0ff1ae24 100644 --- a/tasks/nova_compute_lxd_install.yml +++ b/tasks/nova_compute_lxd_install.yml @@ -28,5 +28,4 @@ retries: 5 delay: 2 tags: - - nova-install - nova-pip-packages diff --git a/tasks/nova_compute_powervm.yml b/tasks/nova_compute_powervm.yml index 2d5ace87..f444bdda 100644 --- a/tasks/nova_compute_powervm.yml +++ b/tasks/nova_compute_powervm.yml @@ -14,6 +14,9 @@ # limitations under the License. - include: nova_compute_powervm_install.yml + tags: + - nova-install + - nova-powervm - name: Add nova user to pvm_admin group user: @@ -21,12 +24,14 @@ groups: "pvm_admin" append: "yes" tags: + - nova-install - nova-powervm - name: Ensure powervm permissions command: "udevadm trigger" changed_when: false tags: + - nova-config - nova-powervm - name: Template Nova interfaces file @@ -37,4 +42,5 @@ group: "root" mode: 0644 tags: + - nova-config - nova-powervm diff --git a/tasks/nova_console_novnc_install.yml b/tasks/nova_console_novnc_install.yml index 69d11a6a..3db92b7a 100644 --- a/tasks/nova_console_novnc_install.yml +++ b/tasks/nova_console_novnc_install.yml @@ -18,7 +18,6 @@ path: "/usr/share/novnc" state: "absent" tags: - - nova-install - nova-novnc-git - name: Get package from git @@ -35,7 +34,6 @@ retries: 5 delay: 2 tags: - - nova-install - nova-novnc-git - name: Install pip packages @@ -52,7 +50,6 @@ when: - nova_get_venv | failed or nova_get_venv | skipped or nova_developer_mode | bool tags: - - nova-install - nova-pip-packages - include: nova_console_novnc_ssl.yml @@ -63,3 +60,4 @@ tags: - nova-novnc - nova-novnc-ssl + - nova-config diff --git a/tasks/nova_console_novnc_ssl.yml b/tasks/nova_console_novnc_ssl.yml index 93f5bb69..c9ea4bf2 100644 --- a/tasks/nova_console_novnc_ssl.yml +++ b/tasks/nova_console_novnc_ssl.yml @@ -25,6 +25,8 @@ local_action: command cat {{ nova_console_user_ssl_cert }} {{ nova_console_user_ssl_ca_cert is defined | ternary(nova_console_user_ssl_ca_cert,'') }} changed_when: false register: nova_console_user_ssl_combined + tags: + - nova-config - name: Drop user provided ssl cert and key copy: @@ -38,3 +40,5 @@ - { content: "{{ nova_console_user_ssl_combined.stdout ~ '\n' }}", dest: "{{ nova_console_ssl_cert }}", mode: "0644" } - { src: "{{ nova_console_user_ssl_key }}", dest: "{{ nova_console_ssl_key }}", mode: "0640" } notify: Restart nova services + tags: + - nova-config diff --git a/tasks/nova_install.yml b/tasks/nova_install.yml index ffe39d7d..e89b0efa 100644 --- a/tasks/nova_install.yml +++ b/tasks/nova_install.yml @@ -68,7 +68,6 @@ delay: 2 with_items: "{{ nova_distro_packages }}" tags: - - nova-install - nova-apt-packages - name: Remove known problem packages for the Spice console @@ -84,7 +83,6 @@ - inventory_hostname in groups['nova_console'] - nova_console_type == "spice" tags: - - nova-install - nova-apt-packages - nova-spice-apt-packages @@ -101,7 +99,6 @@ - inventory_hostname in groups['nova_console'] - nova_console_type == "novnc" tags: - - nova-install - nova-apt-packages - nova-novnc-apt-packages @@ -146,7 +143,6 @@ {% endfor %} when: nova_developer_mode | bool tags: - - nova-install - nova-pip-packages - name: Install requires pip packages @@ -161,7 +157,6 @@ retries: 5 delay: 2 tags: - - nova-install - nova-pip-packages - name: Attempt venv download @@ -172,7 +167,6 @@ register: nova_get_venv when: nova_venv_download | bool tags: - - nova-install - nova-pip-packages - name: Remove existing venv @@ -181,7 +175,6 @@ state: absent when: nova_get_venv | changed tags: - - nova-install - nova-pip-packages - name: Create nova venv dir @@ -190,7 +183,6 @@ state: directory register: nova_venv_dir tags: - - nova-install - nova-pip-packages - name: Unarchive pre-built venv @@ -203,7 +195,6 @@ - nova_get_venv | changed notify: Restart nova services tags: - - nova-install - nova-pip-packages - name: Install pip packages @@ -223,7 +214,6 @@ when: nova_get_venv | failed or nova_get_venv | skipped or nova_developer_mode | bool notify: Restart nova services tags: - - nova-install - nova-pip-packages - name: CentOS remove python from path first @@ -242,7 +232,6 @@ - not nova_developer_mode | bool - nova_get_venv | changed tags: - - nova-install - nova-pip-packages - include: nova_console_spice_install.yml