Fix usage of tags

Tags are working differently with includes vs imports, so we should
respect that and use appropriently.

Change-Id: Iaa029ebb27cec98b51472ce4f127337fb83b8b45
This commit is contained in:
Dmitriy Rabotyagov 2021-03-24 17:43:22 +02:00
parent 78657cee37
commit d354e1d1b7
4 changed files with 50 additions and 12 deletions

View File

@ -64,7 +64,11 @@
when:
- nova_console_user_ssl_cert is defined
- nova_console_user_ssl_key is defined
args:
apply:
tags:
- nova-novnc
- nova-novnc-ssl
- nova-config
tags:
- nova-novnc
- nova-novnc-ssl
- nova-config
- always

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- include_tasks: nova_compute_kvm_install.yml
- import_tasks: nova_compute_kvm_install.yml
tags:
- nova-install
@ -70,6 +70,14 @@
when:
- ansible_facts['distribution'] == 'Ubuntu'
- nova_libvirt_inject_key | bool or nova_libvirt_inject_password | bool
args:
apply:
tags:
- nova-config
- nova-kvm
- nova-libvirt
tags:
- always
- name: Set libvirtd config
template:
@ -179,16 +187,24 @@
- include_tasks: nova_disable_smt.yml
when:
- ansible_facts['architecture'] == 'ppc64le'
args:
apply:
tags:
- nova-config
tags:
- nova-config
- always
- include_tasks: nova_enable_ksm.yml
when:
- nova_compute_ksm_enabled | bool
args:
apply:
tags:
- nova-config
tags:
- nova-config
- always
- include_tasks: nova_compute_kvm_virsh_net_remove.yml
- import_tasks: nova_compute_kvm_virsh_net_remove.yml
tags:
- nova-config
- nova-kvm

View File

@ -14,8 +14,12 @@
# limitations under the License.
- include_tasks: "drivers/{{ nova_virt_type }}/nova_compute_{{ nova_virt_type }}.yml"
args:
apply:
tags:
- nova-install
tags:
- nova-install
- always
- import_tasks: nova_compute_key_populate.yml
tags:
@ -51,5 +55,9 @@
with_items: "{{ nova_nfs_client }}"
loop_control:
loop_var: mount_var
args:
apply:
tags:
- nova-config
tags:
- nova-config
- always

View File

@ -34,6 +34,12 @@
apt_pinned_packages: [{ package: "{{ nova_backports_packages | join(' ') }}", release: 'Debian Backports' }]
when:
- ansible_facts['distribution'] | lower == 'debian'
args:
apply:
tags:
- nova-install
tags:
- always
- name: Install distro packages
package:
@ -92,10 +98,14 @@
nova_services['nova-spicehtml5proxy']['group'] in group_names or
nova_services['nova-serialconsole-proxy']['group'] in group_names"
- "nova_console_type != 'serialconsole'"
args:
apply:
tags:
- nova-install
- nova-novnc-console
- nova-spice-console
tags:
- nova-install
- nova-novnc-console
- nova-spice-console
- always
- name: Populate service facts
service_facts: