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

Change-Id: I086c66d720ead341c6186462bdcd1ecf5fd00b34
This commit is contained in:
Jesse Pretorius 2017-05-22 15:29:22 +00:00
parent dc9d092127
commit 54865e7a18
1 changed files with 7 additions and 0 deletions

View File

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