Replaced the copy_update module

This PR replaces the copy_update module with a proper Ansible action
plugin. This change allows for dynamic updates to configuration files
that are ini, json, and yaml.

All of the policy files have been moved to the role templates directories
and the task syntax has been updated to facilitate the new action plugin.

An entry has been added to the ansible.cfg file to inform Ansible to look
into the new directory. In order for the action plugin to work as a
"module" a virtual module was added to the library directory.

Change-Id: I80331628b2c3d426a95c89d9c1b766e2e3f70e6d
Partially implements: blueprint tunable-openstack-configuration
This commit is contained in:
kevin 2015-08-25 16:44:50 +01:00 committed by Jesse Pretorius
parent 5a4a30465b
commit cd6400c451
2 changed files with 8 additions and 9 deletions

View File

@ -86,15 +86,14 @@
- neutron-config
- name: Apply updates to Policy file
copy_updates:
content="{{ item.content }}"
updates="{{ item.policy_data }}"
dest="{{ item.dest }}"
owner="{{ neutron_system_user_name }}"
group="{{ neutron_system_group_name }}"
mode="{{ item.mode|default('0644') }}"
with_items:
- { content: "{{ lookup('file', 'policy.json') | b64encode }}", policy_data: "{{ neutron_policy_overrides|default('') }}", dest: "/etc/neutron/policy.json" }
config_template:
src: "policy.json"
dest: "/etc/neutron/policy.json"
owner: "{{ neutron_system_user_name }}"
group: "{{ neutron_system_group_name }}"
mode: "0644"
config_overrides: "{{ neutron_policy_overrides|default({}) }}"
config_type: "json"
notify:
- Restart neutron services
tags: