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": {
        "ceilometer": {
            "venv_tag": "14.2.1"
        }
    }
}

Change-Id: I52edede590813edf22db2a2c99c99d8fe2610dc0
(cherry picked from commit c53f12e041)
This commit is contained in:
Jesse Pretorius 2017-05-22 15:36:48 +00:00 committed by Jesse Pretorius (odyssey4me)
parent 9641155f61
commit 983f2fa402

View File

@ -138,3 +138,10 @@
command: >
virtualenv-tools --update-path=auto --reinitialize {{ ceilometer_bin | dirname }}
when: ceilometer_get_venv | changed
- name: Record the venv tag deployed
ini_file:
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
section: ceilometer
option: venv_tag
value: "{{ ceilometer_venv_tag }}"