Fix placement of policy.json

Currently, policy.json is put in
"{{ node_config_directory }}/{{ service_name }}"
in target nodes.

Relocation policy.json to "{{ node_config_directory }}/{{ item }}"
with item is corresponding service compoment config directory.

Currently, the policy.json is copied to all services, but it
should be reviewed and left only in neccesary service
(at many cases, only API service needs that).

Redundant files will be removed in follow up patchset.

Change-Id: I0e997dccf4ec438c9c0436db71ec2fd06650f50d
Closes-Bug: #1639686
This commit is contained in:
Duong Ha-Quang 2016-11-07 12:00:32 +07:00
parent 8b8d10848f
commit b5d1e4b457
22 changed files with 129 additions and 23 deletions

View File

@ -53,6 +53,11 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/aodh/policy.json"
dest: "{{ node_config_directory }}/aodh/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "aodh-api"
- "aodh-evaluator"
- "aodh-listener"
- "aodh-notifier"
when:
aodh_policy.stat.exists

View File

@ -59,6 +59,10 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/barbican/policy.json"
dest: "{{ node_config_directory }}/barbican/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "barbican-api"
- "barbican-keystone-listener"
- "barbican-worker"
when:
barbican_policy.stat.exists

View File

@ -67,6 +67,12 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/ceilometer/policy.json"
dest: "{{ node_config_directory }}/ceilometer/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "ceilometer-notification"
- "ceilometer-collector"
- "ceilometer-api"
- "ceilometer-central"
- "ceilometer-compute"
when:
ceilometer_policy.stat.exists

View File

@ -46,7 +46,12 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/cinder/policy.json"
dest: "{{ node_config_directory }}/cinder/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "cinder-api"
- "cinder-backup"
- "cinder-scheduler"
- "cinder-volume"
when:
cinder_policy.stat.exists

View File

@ -40,6 +40,9 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/cloudkitty/policy.json"
dest: "{{ node_config_directory }}/cloudkitty/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "cloudkitty-api"
- "cloudkitty-processor"
when:
cloudkitty_policy.stat.exists

View File

@ -43,6 +43,10 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/congress/policy.json"
dest: "{{ node_config_directory }}/congress/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "congress-api"
- "congress-policy-engine"
- "congress-datasource"
when:
congress_policy.stat.exists

View File

@ -37,6 +37,8 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/glance/policy.json"
dest: "{{ node_config_directory }}/glance/policy.json"
dest: "{{ node_config_directory }}/{{ item.service }}/policy.json"
when:
glance_policy.stat.exists
- inventory_hostname in groups[item.group]
- glance_policy.stat.exists
with_items: "{{ glance_service_groups }}"

View File

@ -58,6 +58,10 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/gnocchi/policy.json"
dest: "{{ node_config_directory }}/gnocchi/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "gnocchi-api"
- "gnocchi-statsd"
- "gnocchi-metricd"
when:
gnocchi_policy.stat.exists

View File

@ -50,6 +50,10 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/heat/policy.json"
dest: "{{ node_config_directory }}/heat/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "heat-api"
- "heat-api-cfn"
- "heat-engine"
when:
heat_policy.stat.exists

View File

@ -45,6 +45,11 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/ironic/policy.json"
dest: "{{ node_config_directory }}/ironic/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "ironic-api"
- "ironic-conductor"
- "ironic-inspector"
- "ironic-pxe"
when:
ironic_policy.stat.exists

View File

@ -62,7 +62,10 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/keystone/policy.json"
dest: "{{ node_config_directory }}/keystone/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "keystone"
- "keystone-fernet"
when:
keystone_policy.stat.exists

View File

@ -40,6 +40,9 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/magnum/policy.json"
dest: "{{ node_config_directory }}/magnum/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "magnum-api"
- "magnum-conductor"
when:
magnum_policy.stat.exists

View File

@ -63,6 +63,11 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/manila/policy.json"
dest: "{{ node_config_directory }}/manila/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "manila-api"
- "manila-data"
- "manila-scheduler"
- "manila-share"
when:
manila_policy.stat.exists

View File

@ -43,6 +43,10 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/mistral/policy.json"
dest: "{{ node_config_directory }}/mistral/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "mistral-api"
- "mistral-engine"
- "mistral-executor"
when:
mistral_policy.stat.exists

View File

@ -40,6 +40,9 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/murano/policy.json"
dest: "{{ node_config_directory }}/murano/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "murano-api"
- "murano-engine"
when:
murano_policy.stat.exists

View File

@ -191,6 +191,15 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/neutron/policy.json"
dest: "{{ node_config_directory }}/neutron/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "neutron-dhcp-agent"
- "neutron-l3-agent"
- "neutron-linuxbridge-agent"
- "neutron-metadata-agent"
- "neutron-openvswitch-agent"
- "neutron-server"
- "neutron-lbaas-agent"
- "neutron-vpnaas-agent"
when:
neutron_policy.stat.exists

View File

@ -91,6 +91,15 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/nova/policy.json"
dest: "{{ node_config_directory }}/nova/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "nova-api"
- "nova-compute"
- "nova-compute-ironic"
- "nova-conductor"
- "nova-consoleauth"
- "nova-novncproxy"
- "nova-scheduler"
- "nova-spicehtml5proxy"
when:
nova_policy.stat.exists

View File

@ -40,6 +40,9 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/sahara/policy.json"
dest: "{{ node_config_directory }}/sahara/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "sahara-api"
- "sahara-engine"
when:
sahara_policy.stat.exists

View File

@ -38,6 +38,9 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/searchlight/policy.json"
dest: "{{ node_config_directory }}/searchlight/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "searchlight-api"
- "searchlight-listener"
when:
searchlight_policy.stat.exists

View File

@ -40,6 +40,9 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/senlin/policy.json"
dest: "{{ node_config_directory }}/senlin/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "senlin-api"
- "senlin-engine"
when:
senlin_policy.stat.exists

View File

@ -160,6 +160,21 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/swift/policy.json"
dest: "{{ node_config_directory }}/swift/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "swift-account-auditor"
- "swift-account-reaper"
- "swift-account-replicator"
- "swift-account-server"
- "swift-container-auditor"
- "swift-container-replicator"
- "swift-container-server"
- "swift-container-updater"
- "swift-object-auditor"
- "swift-object-expirer"
- "swift-object-replicator"
- "swift-object-server"
- "swift-object-updater"
- "swift-proxy-server"
when:
swift_policy.stat.exists

View File

@ -43,6 +43,10 @@
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/watcher/policy.json"
dest: "{{ node_config_directory }}/watcher/policy.json"
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
with_items:
- "watcher-api"
- "watcher-engine"
- "watcher-applier"
when:
watcher_policy.stat.exists