From 39c16e11480e3a13349c74722be86a7e9e6115d0 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Mon, 22 May 2017 14:51:51 +0000 Subject: [PATCH] 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": { "swift": { "venv_tag": "14.2.1" } } } Change-Id: I54f6317ba1b82c29a2b64c59e64cc7a34a82e880 --- tasks/swift_install.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/swift_install.yml b/tasks/swift_install.yml index 54bc4f1e..ff570da7 100644 --- a/tasks/swift_install.yml +++ b/tasks/swift_install.yml @@ -119,3 +119,10 @@ - include: swift_pypy_setup.yml static: no when: swift_pypy_enabled | bool + +- name: Record the venv tag deployed + ini_file: + dest: "/etc/ansible/facts.d/openstack_ansible.fact" + section: swift + option: venv_tag + value: "{{ swift_venv_tag }}"