Add venv_tag local fact
In order to make it easier to detect the currently deployed venv for a service, and therefore allow smarter decisions for things like upgrading, we implement the venv tag as a local fact. The file used to store facts will be the same for all OpenStack services, with each service using its own section. Example: "ansible_local": { "openstack_ansible": { "keystone": { "venv_tag": "14.2.1" } } } Change-Id: Icf443a93424c9eba7b68d3279ebb48ae00602808
This commit is contained in:
parent
c59387340f
commit
359cd83d5d
@ -252,10 +252,17 @@
|
||||
|
||||
- name: Record the need for a db sync
|
||||
ini_file:
|
||||
dest: /etc/ansible/facts.d/keystone.fact
|
||||
section: general
|
||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||
section: keystone
|
||||
option: need_db_sync
|
||||
value: True
|
||||
when: keystone_get_venv | changed or
|
||||
keystone_venv_dir | changed or
|
||||
install_packages | changed
|
||||
|
||||
- name: Record the venv tag deployed
|
||||
ini_file:
|
||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||
section: keystone
|
||||
option: venv_tag
|
||||
value: "{{ keystone_venv_tag }}"
|
||||
|
@ -88,14 +88,14 @@
|
||||
when:
|
||||
- keystone_database_enabled | bool
|
||||
- inventory_hostname == ansible_play_hosts[0]
|
||||
- ansible_local.keystone.general.need_db_sync | bool
|
||||
- ansible_local['openstack_ansible']['keystone']['need_db_sync'] | bool
|
||||
tags:
|
||||
- keystone-config
|
||||
|
||||
- name: Disable the need of a db sync on all nodes
|
||||
ini_file:
|
||||
dest: /etc/ansible/facts.d/keystone.fact
|
||||
section: general
|
||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||
section: keystone
|
||||
option: need_db_sync
|
||||
value: False
|
||||
when: dbsync | succeeded
|
||||
|
Loading…
Reference in New Issue
Block a user