Bring consistency to tags

Some tags were not applied on the highest level and forced duplication.
We apply here our practices to have role_name-(config|install) [1].
Compute being completely reversed, an exception is done here, and a
tag is applied on top level, instead of refactoring all the includes.

[1]: http://docs.openstack.org/developer/openstack-ansible/developer-docs/contribute.html#ansible-style-guide

Change-Id: Ie48fe950a0cdc3909f1df565f7279a5df905cc16
This commit is contained in:
Jean-Philippe Evrard 2017-01-13 12:36:42 +00:00
parent dae54d61a5
commit 6eafe105c8
10 changed files with 53 additions and 24 deletions

View File

@ -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']

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -28,5 +28,4 @@
retries: 5
delay: 2
tags:
- nova-install
- nova-pip-packages

View File

@ -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

View File

@ -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_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

View File

@ -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

View File

@ -67,7 +67,6 @@
delay: 2
with_items: "{{ nova_distro_packages }}"
tags:
- nova-install
- nova-apt-packages
- name: Remove known problem packages for the Spice console
@ -83,7 +82,6 @@
- inventory_hostname in groups['nova_console']
- nova_console_type == "spice"
tags:
- nova-install
- nova-apt-packages
- nova-spice-apt-packages
@ -100,7 +98,6 @@
- inventory_hostname in groups['nova_console']
- nova_console_type == "novnc"
tags:
- nova-install
- nova-apt-packages
- nova-novnc-apt-packages
@ -145,7 +142,6 @@
{% endfor %}
when: nova_developer_mode | bool
tags:
- nova-install
- nova-pip-packages
- name: Install requires pip packages
@ -160,7 +156,6 @@
retries: 5
delay: 2
tags:
- nova-install
- nova-pip-packages
- name: Attempt venv download
@ -171,7 +166,6 @@
register: nova_get_venv
when: not nova_developer_mode | bool
tags:
- nova-install
- nova-pip-packages
- name: Remove existing venv
@ -180,7 +174,6 @@
state: absent
when: nova_get_venv | changed
tags:
- nova-install
- nova-pip-packages
- name: Create nova venv dir
@ -189,7 +182,6 @@
state: directory
register: nova_venv_dir
tags:
- nova-install
- nova-pip-packages
- name: Unarchive pre-built venv
@ -202,7 +194,6 @@
- nova_get_venv | changed or nova_venv_dir | changed
notify: Restart nova services
tags:
- nova-install
- nova-pip-packages
- name: Install pip packages
@ -222,7 +213,6 @@
when: nova_developer_mode | bool
notify: Restart nova services
tags:
- nova-install
- nova-pip-packages
- name: CentOS remove python from path first
@ -241,7 +231,6 @@
- not nova_developer_mode | bool
- nova_get_venv | changed or nova_venv_dir | changed
tags:
- nova-install
- nova-pip-packages
- include: nova_console_spice_install.yml