Cleanup/standardize usage of tags

The numerous tags within the role have been condensed to two tags:
openstack_hosts-install and openstack_hosts-config

These tags have been chosen as they are namespaced and cover the two major
functions of the role.

Change-Id: Ib52d915fd33af587fb896cc5b2a2c33224164589
This commit is contained in:
Travis Truman
2016-06-03 13:10:46 -04:00
parent 1bbd73bfff
commit e680f5dfdc
11 changed files with 33 additions and 46 deletions

View File

@@ -25,13 +25,46 @@
- always
- include: openstack_kernel_check.yml
tags:
- openstack_hosts-install
- include: openstack_proxy_settings.yml
tags:
- openstack_hosts-install
- openstack_hosts-config
- include: openstack_host_install.yml
tags:
- openstack_hosts-install
- include: openstack_sysstat.yml
tags:
- openstack_hosts-install
- openstack_hosts-config
- include: openstack_update_hosts_file.yml
when: openstack_host_manage_hosts_file | bool
tags:
- openstack_hosts-install
- openstack_hosts-config
- include: openstack_lvm_config.yml
tags:
- openstack_hosts-install
- openstack_hosts-config
- include: openstack_kernel_modules.yml
tags:
- openstack_hosts-config
- include: openstack_kernel_tuning.yml
tags:
- openstack_hosts-config
- include: openstack_authorized_keys.yml
tags:
- openstack_hosts-config
- include: openstack_release.yml
tags:
- openstack_hosts-install

View File

@@ -20,8 +20,6 @@
group: "{{ ansible_user_id }}"
owner: "{{ ansible_user_id }}"
mode: "0755"
tags:
- openstack-host-keys
- name: Update SSH keys
get_url:
@@ -29,8 +27,6 @@
dest: "{{ ansible_env.HOME }}/.ssh/remotekeys"
mode: "0640"
when: ssh_key_url is defined
tags:
- openstack-host-keys
- name: Ensure all keys in authorized_keys
shell: |
@@ -40,5 +36,3 @@
fi
done < /root/.ssh/remotekeys
when: ssh_key_url is defined
tags:
- openstack-host-keys

View File

@@ -16,11 +16,7 @@
- include: openstack_host_install_apt.yml
when:
- ansible_pkg_mgr == 'apt'
tags:
- install-apt
- include: openstack_host_install_yum.yml
when:
- ansible_pkg_mgr == 'yum'
tags:
- install-yum

View File

@@ -20,5 +20,3 @@
[ {{ ansible_kernel }} < {{ openstack_host_required_kernel }} ]
Resolve this issue before continuing.
when: ansible_kernel | version_compare(openstack_host_required_kernel, '<')
tags:
- openstack-host-kernel-check

View File

@@ -18,8 +18,6 @@
name: "{{ item }}"
with_items: openstack_host_kernel_modules
when: openstack_host_kernel_modules is defined and item != ''
tags:
- openstack-host-kernel-modules
- name: "Ensure kernel module(s) loaded at boot"
lineinfile:
@@ -27,14 +25,10 @@
line: "{{ item }}"
with_items: openstack_host_kernel_modules
when: openstack_host_kernel_modules is defined and item != ''
tags:
- openstack-host-kernel-modules
- name: get kernel release
command: "uname -r"
register: uname
tags:
- openstack-host-specific-kernel-modules
- name: check how kernel modules are implemented (statically builtin, dynamic, not set)
shell: grep {{ item.pattern }} /boot/config-{{ uname.stdout}}
@@ -44,8 +38,6 @@
- openstack_host_specific_kernel_modules is defined
- inventory_hostname in groups["{{ item.group }}"]
ignore_errors: yes
tags:
- openstack-host-specific-kernel-modules
- name: fail if a specific kernel module is not set
fail:
@@ -54,8 +46,6 @@
- modules['changed'] | bool
- "'is not set' in item['stdout']"
with_items: modules["results"]
tags:
- openstack-host-specific-kernel-modules
- name: fail if a specific pattern is not valid
fail:
@@ -65,8 +55,6 @@
- "'=y' not in item['stdout']"
- "'=m' not in item['stdout']"
with_items: modules["results"]
tags:
- openstack-host-specific-kernel-modules
- name: "Ensure dynamic specific kernel module(s) are loaded"
modprobe:
@@ -76,8 +64,6 @@
- modules['changed'] | bool
- inventory_hostname in groups[item["item"]["group"]]
- "'=m' in item['stdout']"
tags:
- openstack-host-specific-kernel-modules
- name: "Ensure dynamic specific kernel module(s) loaded at boot"
lineinfile:
@@ -88,5 +74,3 @@
- modules['changed'] | bool
- inventory_hostname in groups[item["item"]["group"]]
- "'=m' in item['stdout']"
tags:
- openstack-host-specific-kernel-modules

View File

@@ -22,5 +22,3 @@
reload: "{{ item.reload|default('yes') }}"
with_items: openstack_kernel_options
ignore_errors: true
tags:
- openstack-host-kernel-tuning

View File

@@ -19,16 +19,12 @@
register: lvm_devices
changed_when: lvm_devices.rc != 0
failed_when: false
tags:
- openstack-host-lvm-config
- name: Ensure "/etc/lvm" directory
file:
state: "directory"
path: "/etc/lvm"
when: lvm_devices.rc == 0
tags:
- openstack-host-lvm-config
- name: Drop lvm Config
template:
@@ -38,5 +34,3 @@
group: "root"
backup: "yes"
when: lvm_devices.rc == 0
tags:
- openstack-host-lvm-config

View File

@@ -18,5 +18,3 @@
dest: "/etc/environment"
src: "environment.j2"
mode: "0644"
tags:
- openstack-host-proxies

View File

@@ -19,5 +19,3 @@
dest: "/etc/openstack-release"
owner: "root"
group: "root"
tags:
- openstack-release

View File

@@ -23,5 +23,3 @@
- { src: "sysstat.cron.j2", dest: "/etc/cron.d/sysstat", mode: "0755" }
when: openstack_host_sysstat_enabled | bool
notify: Restart sysstat
tags:
- openstack-host-sysstat

View File

@@ -18,10 +18,6 @@
src: "openstack-host-hostfile-setup.sh.j2"
dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
mode: "0755"
tags:
- openstack-host-hostfile
- name: Update hosts file
command: "/usr/local/bin/openstack-host-hostfile-setup.sh"
tags:
- openstack-host-hostfile