Cleanup/standardize usage of tags
The numerous tags within the role have been condensed to two tags: heat-install and heat-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: I5eb32ec02d9db382b4cc18f6f6091bec46b31a74
This commit is contained in:
parent
22955b6a9e
commit
cacb9c1365
@ -53,3 +53,12 @@ Example Playbook
|
||||
heat_galera_address: "{{ internal_lb_vip_address }}"
|
||||
keystone_admin_user_name: admin
|
||||
keystone_admin_tenant_name: admin
|
||||
|
||||
Tags
|
||||
====
|
||||
|
||||
This role supports two tags: ``heat-install`` and ``heat-config``
|
||||
|
||||
The ``heat-install`` tag can be used to install and upgrade.
|
||||
|
||||
The ``heat-config`` tag can be used to manage configuration.
|
||||
|
@ -17,7 +17,3 @@
|
||||
command: "{{ heat_bin }}/heat-manage db_sync"
|
||||
become: yes
|
||||
become_user: "{{ heat_system_user_name }}"
|
||||
tags:
|
||||
- heat-db-sync
|
||||
- heat-setup
|
||||
- heat-command-bin
|
||||
|
@ -23,11 +23,6 @@
|
||||
login_project_name: "{{ keystone_admin_tenant_name }}"
|
||||
endpoint: "{{ keystone_service_adminurl }}"
|
||||
insecure: "{{ keystone_service_adminuri_insecure }}"
|
||||
tags:
|
||||
- heat-domain
|
||||
- heat-domain-role
|
||||
- heat-domain-setup
|
||||
- heat-config
|
||||
|
||||
- name: Ensure heat domain
|
||||
keystone:
|
||||
@ -38,10 +33,6 @@
|
||||
login_password: "{{ keystone_auth_admin_password }}"
|
||||
login_project_name: "{{ keystone_admin_tenant_name }}"
|
||||
insecure: "{{ keystone_service_adminuri_insecure }}"
|
||||
tags:
|
||||
- heat-domain
|
||||
- heat-domain-setup
|
||||
- heat-config
|
||||
|
||||
- name: Ensure heat project
|
||||
keystone:
|
||||
@ -53,10 +44,6 @@
|
||||
login_password: "{{ keystone_auth_admin_password }}"
|
||||
login_project_name: "{{ keystone_admin_tenant_name }}"
|
||||
insecure: "{{ keystone_service_adminuri_insecure }}"
|
||||
tags:
|
||||
- heat-domain
|
||||
- heat-domain-setup
|
||||
- heat-config
|
||||
|
||||
- name: Ensure heat user
|
||||
keystone:
|
||||
@ -73,11 +60,6 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
tags:
|
||||
- heat-domain
|
||||
- heat-domain-setup
|
||||
- heat-config
|
||||
- heat-command-bin
|
||||
|
||||
- name: Ensure heat role
|
||||
keystone:
|
||||
@ -94,8 +76,3 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
tags:
|
||||
- heat-domain
|
||||
- heat-domain-setup
|
||||
- heat-config
|
||||
- heat-command-bin
|
||||
|
@ -15,13 +15,9 @@
|
||||
|
||||
- include: heat_init_upstart.yml
|
||||
when: pid1_name == "init"
|
||||
tags:
|
||||
- heat-init
|
||||
|
||||
- include: heat_init_systemd.yml
|
||||
when: pid1_name == "systemd"
|
||||
tags:
|
||||
- heat-init
|
||||
|
||||
- name: Load service
|
||||
service:
|
||||
|
@ -16,8 +16,6 @@
|
||||
- include: install-apt.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
tags:
|
||||
- install-apt
|
||||
|
||||
- name: Create developer mode constraint file
|
||||
copy:
|
||||
@ -28,9 +26,6 @@
|
||||
{% endfor %}
|
||||
when:
|
||||
- heat_developer_mode | bool
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Clone requirements git repository
|
||||
git:
|
||||
@ -41,27 +36,18 @@
|
||||
version: "{{ heat_requirements_git_install_branch }}"
|
||||
when:
|
||||
- heat_developer_mode | bool
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-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:
|
||||
- heat_developer_mode | bool
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-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 heat_developer_mode | bool
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Install requires pip packages
|
||||
pip:
|
||||
@ -73,9 +59,6 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ heat_requires_pip_packages }}"
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Get local venv checksum
|
||||
stat:
|
||||
@ -84,9 +67,6 @@
|
||||
when:
|
||||
- not heat_developer_mode | bool
|
||||
register: local_venv_stat
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Get remote venv checksum
|
||||
uri:
|
||||
@ -95,9 +75,6 @@
|
||||
when:
|
||||
- not heat_developer_mode | bool
|
||||
register: remote_venv_checksum
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
# TODO: When project moves to ansible 2 we can pass this a sha256sum which will:
|
||||
# a) allow us to remove force: yes
|
||||
@ -115,16 +92,10 @@
|
||||
- not heat_developer_mode | bool
|
||||
- (local_venv_stat.stat.exists == False or
|
||||
{{ local_venv_stat.stat.checksum is defined and local_venv_stat.stat.checksum != remote_venv_checksum.content | trim }})
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Set heat get_venv fact
|
||||
set_fact:
|
||||
heat_get_venv: "{{ get_venv }}"
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Remove existing venv
|
||||
file:
|
||||
@ -132,18 +103,12 @@
|
||||
state: absent
|
||||
when:
|
||||
- heat_get_venv | changed
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Create heat venv dir
|
||||
file:
|
||||
path: "{{ heat_bin | dirname }}"
|
||||
state: directory
|
||||
register: heat_venv_dir
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Unarchive pre-built venv
|
||||
unarchive:
|
||||
@ -154,9 +119,6 @@
|
||||
- not heat_developer_mode | bool
|
||||
- heat_get_venv | changed or heat_venv_dir | changed
|
||||
notify: Restart heat services
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Install pip packages
|
||||
pip:
|
||||
@ -173,9 +135,6 @@
|
||||
when:
|
||||
- heat_get_venv | failed or heat_developer_mode | bool
|
||||
notify: Restart heat services
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
- name: Update virtualenv path
|
||||
command: >
|
||||
@ -183,7 +142,3 @@
|
||||
when:
|
||||
- not heat_developer_mode | bool
|
||||
- heat_get_venv | success
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-pip-packages
|
||||
|
||||
|
@ -49,5 +49,3 @@
|
||||
config_type: "json"
|
||||
notify:
|
||||
- Restart heat services
|
||||
tags:
|
||||
- heat-config
|
||||
|
@ -18,8 +18,6 @@
|
||||
name: "{{ heat_system_group_name }}"
|
||||
state: "present"
|
||||
system: "yes"
|
||||
tags:
|
||||
- heat-group
|
||||
|
||||
- name: Create the heat system user
|
||||
user:
|
||||
@ -30,8 +28,6 @@
|
||||
system: "yes"
|
||||
createhome: "yes"
|
||||
home: "/var/lib/{{ heat_system_user_name }}"
|
||||
tags:
|
||||
- heat-user
|
||||
|
||||
- name: Create heat dir
|
||||
file:
|
||||
@ -47,8 +43,6 @@
|
||||
- { path: "/etc/heat/templates" }
|
||||
- { path: "/var/cache/heat", mode: "0700" }
|
||||
- { path: "{{ heat_system_home_folder }}" }
|
||||
tags:
|
||||
- heat-dirs
|
||||
|
||||
- name: Create heat plugin dirs
|
||||
file:
|
||||
@ -57,8 +51,6 @@
|
||||
owner: "{{ heat_system_user_name }}"
|
||||
group: "{{ heat_system_group_name }}"
|
||||
with_items: "{{ heat_plugin_dirs }}"
|
||||
tags:
|
||||
- heat-dirs
|
||||
|
||||
- name: Test for log directory or link
|
||||
shell: |
|
||||
@ -71,9 +63,6 @@
|
||||
register: log_dir
|
||||
failed_when: false
|
||||
changed_when: log_dir.rc != 0
|
||||
tags:
|
||||
- heat-dirs
|
||||
- heat-logs
|
||||
|
||||
- name: Create heat log dir
|
||||
file:
|
||||
@ -85,6 +74,3 @@
|
||||
with_items:
|
||||
- { path: "/var/log/heat" }
|
||||
when: log_dir.rc != 0
|
||||
tags:
|
||||
- heat-dirs
|
||||
- heat-logs
|
||||
|
@ -29,10 +29,6 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
tags:
|
||||
- heat-api-setup
|
||||
- heat-service-add
|
||||
- heat-setup
|
||||
|
||||
# Create an admin user
|
||||
- name: Ensure heat user
|
||||
@ -51,10 +47,6 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
tags:
|
||||
- heat-api-setup
|
||||
- heat-service-add
|
||||
- heat-setup
|
||||
|
||||
# Add a role to the user
|
||||
- name: Ensure heat user to admin role
|
||||
@ -73,10 +65,6 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
tags:
|
||||
- heat-api-setup
|
||||
- heat-service-add
|
||||
- heat-setup
|
||||
|
||||
# Create an endpoint
|
||||
- name: Ensure heat endpoint
|
||||
@ -101,7 +89,3 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
tags:
|
||||
- heat-api-setup
|
||||
- heat-service-add
|
||||
- heat-setup
|
||||
|
@ -21,8 +21,6 @@
|
||||
service_publicurl: "{{ heat_service_publicurl }}"
|
||||
service_internalurl: "{{ heat_service_internalurl }}"
|
||||
service_adminurl: "{{ heat_service_adminurl }}"
|
||||
tags:
|
||||
- heat-api
|
||||
|
||||
- include: heat_service_add.yml
|
||||
vars:
|
||||
@ -32,9 +30,6 @@
|
||||
service_publicurl: "{{ heat_cfn_service_publicurl }}"
|
||||
service_internalurl: "{{ heat_cfn_service_internalurl }}"
|
||||
service_adminurl: "{{ heat_cfn_service_adminurl }}"
|
||||
tags:
|
||||
- heat-api
|
||||
- heat-api-cfn
|
||||
|
||||
# We add the keystone role used by heat to delegate to the heat service user
|
||||
# (for performing deferred operations via trusts)
|
||||
@ -53,9 +48,6 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
tags:
|
||||
- heat-api
|
||||
- heat-api-cfn
|
||||
|
||||
# Any user creating stacks needs to have the 'heat_stack_owner' role assigned,
|
||||
# we add to admin user here for testing purposes
|
||||
@ -74,6 +66,3 @@
|
||||
until: add_service|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
tags:
|
||||
- heat-api
|
||||
- heat-api-cfn
|
||||
|
@ -20,15 +20,11 @@
|
||||
stat:
|
||||
path: /var/cache/apt
|
||||
register: apt_cache_stat
|
||||
tags:
|
||||
- heat-apt-packages
|
||||
|
||||
- name: Update apt if needed
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
|
||||
tags:
|
||||
- heat-apt-packages
|
||||
|
||||
- name: Install apt packages
|
||||
apt:
|
||||
@ -39,6 +35,3 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ heat_apt_packages }}"
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-apt-packages
|
@ -45,21 +45,39 @@
|
||||
- always
|
||||
|
||||
- include: heat_pre_install.yml
|
||||
tags:
|
||||
- heat-install
|
||||
|
||||
- include: heat_install.yml
|
||||
tags:
|
||||
- heat-install
|
||||
|
||||
- include: heat_post_install.yml
|
||||
tags:
|
||||
- heat-install
|
||||
- heat-config
|
||||
|
||||
- include: heat_init.yml
|
||||
tags:
|
||||
- heat-install
|
||||
|
||||
- include: heat_domain_setup.yml
|
||||
when: >
|
||||
inventory_hostname == groups['heat_all'][0]
|
||||
tags:
|
||||
- heat-install
|
||||
|
||||
- include: heat_db_setup.yml
|
||||
when: >
|
||||
inventory_hostname == groups['heat_all'][0]
|
||||
tags:
|
||||
- heat-install
|
||||
|
||||
- include: heat_service_setup.yml
|
||||
when: >
|
||||
inventory_hostname == groups['heat_all'][0]
|
||||
tags:
|
||||
- heat-install
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
Loading…
x
Reference in New Issue
Block a user