From 46d38acfb8781b3fb0fe6636861158a2d9f50c58 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 30 Sep 2015 12:48:13 +0100 Subject: [PATCH] Allow pip extra arguments to be passed to playbooks This patch adds the variable 'pip_install_options' which is passed to the pip install module as extra arguments in order to allow the use of options like '--force-reinstall' when executing playbooks. eg: openstack-ansible -e pip_install_options="--force-reinstall" \ setup-openstack.yml This is required due to constant upstream changes in dependencies which result in python wheel version upgrades and downgrades between tagged versions of openstack-ansible. The intention is that this can be used whenever a deployer switches between tags for both upgrades and downgrades. DocImpact Closes-Bug: #1489251 Closes-Bug: #1499451 Related-Bug: #1501114 Change-Id: I996185e009a4c4af4f23798619bdbd0d490360c9 --- tasks/nova_install.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/nova_install.yml b/tasks/nova_install.yml index 8ad6d936..ad7f2fcb 100644 --- a/tasks/nova_install.yml +++ b/tasks/nova_install.yml @@ -40,6 +40,7 @@ pip: name: "{{ item }}" state: present + extra_args: "{{ pip_install_options|default('') }}" register: install_packages until: install_packages|success retries: 5