From 8ce498165ea61ce028a786ab70754a6b4cc47a2a Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Mon, 22 May 2017 15:41:47 +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": { "horizon": { "venv_tag": "14.2.1" } } } Change-Id: I45f5cae17ff86de782096e88a0b29eba4f3ddb69 --- tasks/horizon_install.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/horizon_install.yml b/tasks/horizon_install.yml index b3123e53..ef09b668 100644 --- a/tasks/horizon_install.yml +++ b/tasks/horizon_install.yml @@ -174,3 +174,10 @@ - { path: "{{ horizon_lib_dir }}/openstack_dashboard", mode: "2755" } - { path: "{{ horizon_lib_dir }}/openstack_dashboard/local", mode: "2755" } - { path: "{{ horizon_lib_dir }}/openstack_dashboard/local/enabled", mode: "2755" } + +- name: Record the venv tag deployed + ini_file: + dest: "/etc/ansible/facts.d/openstack_ansible.fact" + section: horizon + option: venv_tag + value: "{{ horizon_venv_tag }}"