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

Change-Id: I79bf0b7c01dde7298a11a45cfc1e2e4fadcf217a
This commit is contained in:
Jesse Pretorius
2017-05-22 14:33:17 +00:00
parent e16641e8f4
commit e96e20245a

View File

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