From 190522159369ddfec4c8df72bb2a3da351cb841d Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Mon, 22 May 2017 15:47:27 +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": { "rally": { "venv_tag": "14.2.1" } } } Change-Id: Icdc4a3bf4e802d8065105155aad207192d2df266 (cherry picked from commit 997a03aa81ee8ede5aad21a9f27179a3a452f872) --- tasks/rally_install.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/rally_install.yml b/tasks/rally_install.yml index 93496fd..c7fdae4 100644 --- a/tasks/rally_install.yml +++ b/tasks/rally_install.yml @@ -107,3 +107,10 @@ command: > virtualenv-tools --update-path=auto --reinitialize {{ rally_bin | dirname }} when: rally_get_venv | changed + +- name: Record the venv tag deployed + ini_file: + dest: "/etc/ansible/facts.d/openstack_ansible.fact" + section: rally + option: venv_tag + value: "{{ rally_venv_tag }}"