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": {
"gnocchi": {
"venv_tag": "14.2.1"
}
}
}
Change-Id: Id942ca5c4039d5b7b556f1c75834b99ced7f43f2
(cherry picked from commit d713fbc6e5
)
This commit is contained in:
parent
5932746fe1
commit
7ac1171f2f
|
@ -115,3 +115,10 @@
|
|||
command: >
|
||||
virtualenv-tools --update-path=auto --reinitialize {{ gnocchi_bin | dirname }}
|
||||
when: gnocchi_get_venv | changed
|
||||
|
||||
- name: Record the venv tag deployed
|
||||
ini_file:
|
||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||
section: gnocchi
|
||||
option: venv_tag
|
||||
value: "{{ gnocchi_venv_tag }}"
|
||||
|
|
Loading…
Reference in New Issue