Skip to content
Snippets Groups Projects
Commit ef1fd6b8 authored by Eduardo Gonzalez's avatar Eduardo Gonzalez
Browse files

Custom policy files

Allow operators to use their custom policy files.
Avoid maintain policy files in kolla repos, only copying
the files when an operator add their custom config.

Implements: blueprint custom-policies
Change-Id: Icf3c961b87cbc7a1f1dd2ffbfffcf271d151d862
parent 40a1176a
No related branches found
No related tags found
No related merge requests found
Showing
with 210 additions and 1 deletion
...@@ -45,3 +45,14 @@ ...@@ -45,3 +45,14 @@
dest: "{{ node_config_directory }}/{{ item }}/wsgi-aodh.conf" dest: "{{ node_config_directory }}/{{ item }}/wsgi-aodh.conf"
with_items: with_items:
- "aodh-api" - "aodh-api"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/aodh/policy.json"
register: aodh_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/aodh/policy.json"
dest: "{{ node_config_directory }}/aodh/policy.json"
when:
aodh_policy.stat.exists
...@@ -51,3 +51,14 @@ ...@@ -51,3 +51,14 @@
- "barbican-api" - "barbican-api"
- "barbican-keystone-listener" - "barbican-keystone-listener"
- "barbican-worker" - "barbican-worker"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/barbican/policy.json"
register: barbican_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/barbican/policy.json"
dest: "{{ node_config_directory }}/barbican/policy.json"
when:
barbican_policy.stat.exists
...@@ -59,3 +59,14 @@ ...@@ -59,3 +59,14 @@
- "event_definitions.yaml" - "event_definitions.yaml"
- "event_pipeline.yaml" - "event_pipeline.yaml"
- "pipeline.yaml" - "pipeline.yaml"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/ceilometer/policy.json"
register: ceilometer_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/ceilometer/policy.json"
dest: "{{ node_config_directory }}/ceilometer/policy.json"
when:
ceilometer_policy.stat.exist
...@@ -38,3 +38,14 @@ ...@@ -38,3 +38,14 @@
- "cinder-backup" - "cinder-backup"
- "cinder-scheduler" - "cinder-scheduler"
- "cinder-volume" - "cinder-volume"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/cinder/policy.json"
register: cinder_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/cinder/policy.json"
dest: "{{ node_config_directory }}/cinder/policy.json"
when:
cinder_policy.stat.exists
...@@ -32,3 +32,14 @@ ...@@ -32,3 +32,14 @@
with_items: with_items:
- "cloudkitty-api" - "cloudkitty-api"
- "cloudkitty-processor" - "cloudkitty-processor"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/cloudkitty/policy.json"
register: cloudkitty_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/cloudkitty/policy.json"
dest: "{{ node_config_directory }}/cloudkitty/policy.json"
when:
cloudkitty_policy.stat.exists
...@@ -35,3 +35,14 @@ ...@@ -35,3 +35,14 @@
- "congress-api" - "congress-api"
- "congress-policy-engine" - "congress-policy-engine"
- "congress-datasource" - "congress-datasource"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/congress/policy.json"
register: congress_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/congress/policy.json"
dest: "{{ node_config_directory }}/congress/policy.json"
when:
congress_policy.stat.exists
...@@ -29,3 +29,14 @@ ...@@ -29,3 +29,14 @@
dest: "{{ node_config_directory }}/{{ item.service }}/{{ item.service }}.conf" dest: "{{ node_config_directory }}/{{ item.service }}/{{ item.service }}.conf"
when: inventory_hostname in groups[item.group] when: inventory_hostname in groups[item.group]
with_items: "{{ glance_service_groups }}" with_items: "{{ glance_service_groups }}"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/glance/policy.json"
register: glance_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/glance/policy.json"
dest: "{{ node_config_directory }}/glance/policy.json"
when:
glance_policy.stat.exists
...@@ -50,3 +50,14 @@ ...@@ -50,3 +50,14 @@
dest: "{{ node_config_directory }}/{{ item }}/wsgi-gnocchi.conf" dest: "{{ node_config_directory }}/{{ item }}/wsgi-gnocchi.conf"
with_items: with_items:
- "gnocchi-api" - "gnocchi-api"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/gnocchi/policy.json"
register: gnocchi_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/gnocchi/policy.json"
dest: "{{ node_config_directory }}/gnocchi/policy.json"
when:
gnocchi_policy.stat.exists
...@@ -42,3 +42,14 @@ ...@@ -42,3 +42,14 @@
- "heat-api" - "heat-api"
- "heat-api-cfn" - "heat-api-cfn"
- "heat-engine" - "heat-engine"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/heat/policy.json"
register: heat_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/heat/policy.json"
dest: "{{ node_config_directory }}/heat/policy.json"
when:
heat_policy.stat.exists
...@@ -37,3 +37,14 @@ ...@@ -37,3 +37,14 @@
- "ironic-api" - "ironic-api"
- "ironic-conductor" - "ironic-conductor"
- "ironic-inspector" - "ironic-inspector"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/ironic/policy.json"
register: ironic_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/ironic/policy.json"
dest: "{{ node_config_directory }}/ironic/policy.json"
when:
ironic_policy.stat.exists
--- ---
- name: Check if Policies shall be overwritten - name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/keystone/policy.json" local_action: stat path="{{ node_custom_config }}/keystone/policy.json"
register: keystone_policy register: keystone_policy
......
...@@ -23,3 +23,14 @@ ...@@ -23,3 +23,14 @@
template: template:
src: "kuryr.spec.j2" src: "kuryr.spec.j2"
dest: "{{ node_config_directory }}/kuryr/kuryr.spec" dest: "{{ node_config_directory }}/kuryr/kuryr.spec"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/kuryr/policy.json"
register: kuryr_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/kuryr/policy.json"
dest: "{{ node_config_directory }}/kuryr/policy.json"
when:
kuryr_policy.stat.exists
...@@ -32,3 +32,14 @@ ...@@ -32,3 +32,14 @@
with_items: with_items:
- "magnum-api" - "magnum-api"
- "magnum-conductor" - "magnum-conductor"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/magnum/policy.json"
register: magnum_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/magnum/policy.json"
dest: "{{ node_config_directory }}/magnum/policy.json"
when:
magnum_policy.stat.exists
...@@ -52,3 +52,14 @@ ...@@ -52,3 +52,14 @@
dest: "{{ node_config_directory }}/{{ item }}/manila.conf" dest: "{{ node_config_directory }}/{{ item }}/manila.conf"
with_items: with_items:
- "manila-share" - "manila-share"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/manila/policy.json"
register: manila_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/manila/policy.json"
dest: "{{ node_config_directory }}/manila/policy.json"
when:
manila_policy.stat.exists
...@@ -35,3 +35,14 @@ ...@@ -35,3 +35,14 @@
- "mistral-api" - "mistral-api"
- "mistral-engine" - "mistral-engine"
- "mistral-executor" - "mistral-executor"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/mistral/policy.json"
register: mistral_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/mistral/policy.json"
dest: "{{ node_config_directory }}/mistral/policy.json"
when:
mistral_policy.stat.exists
...@@ -32,3 +32,14 @@ ...@@ -32,3 +32,14 @@
with_items: with_items:
- "murano-api" - "murano-api"
- "murano-engine" - "murano-engine"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/murano/policy.json"
register: murano_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/murano/policy.json"
dest: "{{ node_config_directory }}/murano/policy.json"
when:
murano_policy.stat.exists
...@@ -183,3 +183,14 @@ ...@@ -183,3 +183,14 @@
dest: "{{ node_config_directory }}/{{ item }}/vpnaas_agent.ini" dest: "{{ node_config_directory }}/{{ item }}/vpnaas_agent.ini"
with_items: with_items:
- "neutron-vpnaas-agent" - "neutron-vpnaas-agent"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/neutron/policy.json"
register: neutron_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/neutron/policy.json"
dest: "{{ node_config_directory }}/neutron/policy.json"
when:
neutron_policy.stat.exists
...@@ -83,3 +83,14 @@ ...@@ -83,3 +83,14 @@
- { src: "id_rsa", dest: "id_rsa" } - { src: "id_rsa", dest: "id_rsa" }
- { src: "id_rsa.pub", dest: "id_rsa.pub" } - { src: "id_rsa.pub", dest: "id_rsa.pub" }
- { src: "ssh_config.j2", dest: "ssh_config" } - { src: "ssh_config.j2", dest: "ssh_config" }
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/nova/policy.json"
register: nova_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/nova/policy.json"
dest: "{{ node_config_directory }}/nova/policy.json"
when:
nova_policy.stat.exists
...@@ -24,3 +24,14 @@ ...@@ -24,3 +24,14 @@
dest: "{{ node_config_directory }}/{{ item }}/rally.conf" dest: "{{ node_config_directory }}/{{ item }}/rally.conf"
with_items: with_items:
- "rally" - "rally"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/rally/policy.json"
register: rally_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/rally/policy.json"
dest: "{{ node_config_directory }}/rally/policy.json"
when:
rally_policy.stat.exists
...@@ -32,3 +32,14 @@ ...@@ -32,3 +32,14 @@
with_items: with_items:
- "sahara-api" - "sahara-api"
- "sahara-engine" - "sahara-engine"
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/sahara/policy.json"
register: sahara_policy
- name: Copying over existing policy.json
template:
src: "{{ node_custom_config }}/sahara/policy.json"
dest: "{{ node_config_directory }}/sahara/policy.json"
when:
sahara_policy.stat.exists
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment