From 49b82a3573be1e8e56986b73d53da62c3953d08e Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Wed, 19 Jul 2017 10:42:55 -0400 Subject: [PATCH] Flag service for restart if the venv changes Depends-On: I73ff5c97de03cab0cc040f7869379f18c1448b0a Change-Id: I837e31e5f17b31d4cd6191df196acd3c91bfc91e --- tasks/swift_install.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tasks/swift_install.yml b/tasks/swift_install.yml index e0424190..76208c21 100644 --- a/tasks/swift_install.yml +++ b/tasks/swift_install.yml @@ -120,6 +120,20 @@ static: no when: swift_pypy_enabled | bool +- name: Record the need for a service restart + ini_file: + dest: "/etc/ansible/facts.d/openstack_ansible.fact" + section: swift + option: need_service_restart + value: True + when: swift_get_venv | changed or + swift_venv_dir | changed or + install_packages | changed or + ansible_local is not defined or + 'openstack_ansible' not in ansible_local or + 'swift' not in ansible_local['openstack_ansible'] or + 'need_service_restart' not in ansible_local['openstack_ansible']['swift'] + - name: Record the venv tag deployed ini_file: dest: "/etc/ansible/facts.d/openstack_ansible.fact"