adds the config_template to pip_lock_down

The change modifies the pip_lock_down template tasks such that it's now
using the config_template action plugin. This change will make so that
config files can be dynamically updated, by a deployer, at run time,
without requiring the need to modify the in tree templates or defaults.

Partially implements: blueprint tunable-openstack-configuration

Change-Id: I620b7f599a9e41f5fe38a2d038b53cfa227c1d55
This commit is contained in:
Kevin Carter 2015-09-14 18:53:07 -05:00 committed by Jesse Pretorius
parent 88c948c455
commit cfeec1cc3a
2 changed files with 11 additions and 3 deletions

View File

@ -27,3 +27,6 @@ pip_allow_all_external: true
# Drop link files to lock down pip
pip_links:
- { name: "openstack_release", link: "{{ openstack_repo_url }}/os-releases/{{ openstack_release }}/" }
## Tunable overrides
pip_global_conf_overrides: {}

View File

@ -41,14 +41,19 @@
- lock-pip-files
- name: Drop pip global config(s)
template:
config_template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "{{ ansible_user_id }}"
group: "{{ ansible_user_id }}"
mode: "{{ item.mode|default('0644') }}"
mode: "0644"
config_overrides: "{{ item.config_overrides }}"
config_type: "{{ item.config_type }}"
with_items:
- { src: "global.conf.j2", dest: "{{ ansible_env.HOME }}/.pip/base/global.conf" }
- src: "global.conf.j2"
dest: "{{ ansible_env.HOME }}/.pip/base/global.conf"
config_overrides: "{{ pip_global_conf_overrides }}"
config_type: "ini"
tags:
- lock-pip-files