Cleanup/standardize usage of tags

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

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

Documentation has been updated to inform how each tag
influences the function of the role.

Change-Id: I6b7f1377696629d9cc3fff1e56f2751f2badfda8
This commit is contained in:
Travis Truman 2016-07-08 12:04:56 -04:00
parent 2e83f7e389
commit bed0e815ba
14 changed files with 25 additions and 115 deletions

View File

@ -43,3 +43,13 @@ Example Playbook
keystone_admin_user_name: admin
keystone_auth_admin_password: SuperSecretePassword4
keystone_admin_tenant_name: admin
Tags
====
This role supports two tags: ``barbican-install`` and ``barbican-config``
The ``barbican-install`` tag can be used to install and upgrade.
The ``barbican-config`` tag can be used to maintain configuration of the
service.

View File

@ -24,8 +24,6 @@
- { src: "barbican-httpd.conf.j2", dest: "/etc/apache2/sites-available/barbican-httpd.conf" }
notify:
- Restart Apache
tags:
- barbican-httpd
- name: Disable default apache site
file:
@ -33,8 +31,6 @@
state: "absent"
notify:
- Restart Apache
tags:
- barabican-httpd
- name: Enable Barbican vhost
file:
@ -45,8 +41,6 @@
- { src: "/etc/apache2/sites-available/barbican-httpd.conf", dest: "/etc/apache2/sites-enabled/barbican-httpd.conf", state: "link" }
notify:
- Restart Apache
tags:
- barbican-httpd
- name: Ensure Apache ServerName
lineinfile:
@ -54,8 +48,6 @@
line: "ServerName {{ inventory_hostname }}"
notify:
- Restart Apache
tags:
- barbican-httpd
- name: Ensure Apache ServerTokens
lineinfile:
@ -64,8 +56,6 @@
line: "ServerTokens {{ barbican_apache_servertokens }}"
notify:
- Restart Apache
tags:
- barbican-httpd
- name: Ensure Apache ServerSignature
lineinfile:
@ -74,8 +64,6 @@
line: "ServerSignature {{ barbican_apache_serversignature }}"
notify:
- Restart Apache
tags:
- barbican-httpd
- name: Enable/disable mod_ssl for apache2
apache2_module:
@ -83,6 +71,3 @@
state: "{{ (barbican_ssl | bool) | ternary('present', 'absent') }}"
notify:
- Restart Apache
tags:
- barbican-httpd
- barbican-ssl

View File

@ -18,8 +18,6 @@
dest: "{{ barbican_ssl_cert }}"
state: "absent"
when: barbican_ssl_self_signed_regen | bool
tags:
- barbican-ssl
- name: Create self-signed Apache ssl cert
command: >
@ -31,6 +29,3 @@
-extensions v3_ca
creates={{ barbican_ssl_cert }}
notify: Restart Apache
tags:
- barbican-configs
- barbican-ssl

View File

@ -17,9 +17,3 @@
command: "barbican-db-manage upgrade"
become: yes
become_user: "{{ barbican_system_user_name }}"
tags:
- barbican-database-setup
- barbican-db-setup
- barbican-database-sync
- barbican-db-sync
- barbican-setup

View File

@ -30,6 +30,3 @@
retries: 5
delay: 2
notify: Restart Apache
tags:
- barbican-config
- barbican-ssl

View File

@ -16,10 +16,6 @@
- include: barbican_install_apt.yml
when:
- ansible_pkg_mgr == 'apt'
tags:
- barbican-apt-packages
- barbican-apt-sources
- barbican-install
- name: Create developer mode constraint file
copy:
@ -30,9 +26,6 @@
{% endfor %}
when:
- barbican_developer_mode | bool
tags:
- barbican-install
- barbican-pip-packages
- name: Clone requirements git repository
git:
@ -43,27 +36,18 @@
version: "{{ barbican_requirements_git_install_branch }}"
when:
- barbican_developer_mode | bool
tags:
- barbican-install
- barbican-pip-packages
- name: Add constraints to pip_install_options fact for developer mode
set_fact:
pip_install_options_fact: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt"
when:
- barbican_developer_mode | bool
tags:
- barbican-install
- barbican-pip-packages
- name: Set pip_install_options_fact when not in developer mode
set_fact:
pip_install_options_fact: "{{ pip_install_options|default('') }}"
when:
- not barbican_developer_mode | bool
tags:
- barbican-install
- barbican-pip-packages
- name: Install pip packages for Barbican
pip:
@ -75,6 +59,3 @@
retries: 5
delay: 2
with_items: "{{ barbican_pip_packages }}"
tags:
- barbican-install
- barbican-pip-packages

View File

@ -27,20 +27,34 @@
- always
- include: pre-install.yml
tags:
- barbican-install
- include: install.yml
tags:
- barbican-install
- include: post-install.yml
tags:
- barbican-install
- barbican-config
- include: upstart-init.yml
tags:
- barbican-install
- barbican-config
- include: database-setup.yml
when: >
inventory_hostname == groups['barbican_all'][0]
tags:
- barbican-install
- include: service-setup.yml
when: >
inventory_hostname == groups['barbican_all'][0]
tags:
- barbican-install
- name: Restart Barbican Services
service:

View File

@ -42,8 +42,4 @@
- source: "barbican-vassals-api.ini.j2"
destination: "{{ barbican_etc_directory }}/vassals/barbican-api.ini"
config_overrides: "{{ barbican_vassals_api_overrides }}"
config_type: "ini"
tags:
- barbican-config-files
- barbican-configuration
- barbican-post-install
config_type: "ini"

View File

@ -18,9 +18,6 @@
name: "{{ barbican_system_group_name }}"
state: "present"
system: "yes"
tags:
- barbican-group
- barbican-system-settings
- name: Create the Barbican system user
user:
@ -31,9 +28,6 @@
system: "yes"
createhome: "yes"
home: "{{ barbican_system_user_home }}"
tags:
- barbican-user
- barbican-system-settings
- name: Create Barbican's directories
file:
@ -46,9 +40,6 @@
- path: "/etc/barbican"
- path: "/etc/barbican/vassals"
- path: "{{ barbican_system_user_home }}"
tags:
- barbican-directories
- barbican-system-settings
- name: Test for Barbican log directory or link
shell: |
@ -61,10 +52,6 @@
register: log_dir
failed_when: false
changed_when: log_dir.rc != 0
tags:
- barbican-directories
- barbican-logs
- barbican-system-settings
- name: Create Barbican log directory
file:
@ -74,7 +61,3 @@
group: "{{ barbican_system_group_name }}"
mode: "0750"
when: log_dir.rc != 0
tags:
- barbican-directories
- barbican-logs
- barbican-system-settings

View File

@ -28,10 +28,6 @@
until: add_barbican_service |success
retries: 5
delay: 2
tags:
- barbican-api-setup
- barbican-service-add
- barbican-setup
- name: Ensure the Barbican user exists
keystone:
@ -48,11 +44,6 @@
until: add_barbican_user |success
retries: 5
delay: 2
tags:
- barbican-api-setup
- barbican-service-add
- barbican-user-add
- barbican-setup
- name: Ensure the Barbican user has the admin role
keystone:
@ -70,10 +61,6 @@
retries: 5
delay: 2
with_items: "{{ barbican_service_role_names }}"
tags:
- barbican-api-setup
- barbican-role-setup
- barbican-setup
- name: Ensure the Barbican endpoint is registered
keystone:
@ -97,8 +84,3 @@
until: add_barbican_endpoints |success
retries: 5
delay: 2
tags:
- barbican-api-setup
- barbican-service-add
- barbican-endpoints-add
- barbican-setup

View File

@ -17,9 +17,5 @@
when: >
barbican_ssl | bool and
(barbican_user_ssl_cert is not defined or barbican_user_ssl_key is not defined)
tags:
- barbican-ssl
- include: user-provided-ssl.yml
tags:
- barbican-ssl

View File

@ -27,5 +27,3 @@
until: barbican_memcache_keys |success
retries: 5
delay: 2
tags:
- barbican-ssl

View File

@ -20,24 +20,12 @@
mode: "0644"
owner: "root"
group: "root"
tags:
- upstart-init
- barbican-upstart
- barbican-init
- name: Reload init scripts
shell: |
initctl reload-configuration
tags:
- upstart-init
- barbican-upstart
- barbican-init
- name: Load service
service:
name: "{{ program_name }}"
enabled: "yes"
tags:
- upstart-init
- barbican-upstart
- barbican-init

View File

@ -22,9 +22,6 @@
mode: "0644"
when: barbican_user_ssl_cert is defined
notify: Restart Apache
tags:
- barbican-configs
- barbican-ssl
- name: Drop user provided ssl key
copy:
@ -35,9 +32,6 @@
mode: "0640"
when: barbican_user_ssl_key is defined
notify: Restart Apache
tags:
- barbican-configs
- barbican-ssl
- name: Drop user provided ssl CA cert
copy:
@ -48,6 +42,3 @@
mode: "0644"
when: barbican_user_ssl_ca_cert is defined
notify: Restart Apache
tags:
- barbican-configs
- barbican-ssl