3e7ed2c42c
Change-Id: I515fdcdf6093e9e59dbbdc97221d23ed7f4e0a3d Partially-Implements: blueprint add-panko-ansible-role
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
---
|
|
- name: Ensuring config directories exist
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item }}"
|
|
state: "directory"
|
|
recurse: yes
|
|
with_items:
|
|
- "panko-api"
|
|
|
|
- name: Copying over config.json files for services
|
|
template:
|
|
src: "{{ item }}.json.j2"
|
|
dest: "{{ node_config_directory }}/{{ item }}/config.json"
|
|
with_items:
|
|
- "panko-api"
|
|
|
|
- name: Copying over panko.conf
|
|
merge_configs:
|
|
vars:
|
|
service_name: "{{ item }}"
|
|
sources:
|
|
- "{{ role_path }}/templates/panko.conf.j2"
|
|
- "{{ node_custom_config }}/global.conf"
|
|
- "{{ node_custom_config }}/database.conf"
|
|
- "{{ node_custom_config }}/messaging.conf"
|
|
- "{{ node_custom_config }}/panko.conf"
|
|
- "{{ node_custom_config }}/panko/{{ item }}.conf"
|
|
- "{{ node_custom_config }}/panko/{{ inventory_hostname }}/{{ item }}.conf"
|
|
dest: "{{ node_config_directory }}/{{ item }}/panko.conf"
|
|
with_items:
|
|
- "panko-api"
|
|
|
|
- name: Copying over wsgi-panko files for services
|
|
template:
|
|
src: "wsgi-panko.conf.j2"
|
|
dest: "{{ node_config_directory }}/{{ item }}/wsgi-panko.conf"
|
|
with_items:
|
|
- "panko-api"
|
|
|
|
- name: Check if policies shall be overwritten
|
|
local_action: stat path="{{ node_custom_config }}/panko/policy.json"
|
|
register: panko_policy
|
|
|
|
- name: Copying over existing policy.json
|
|
template:
|
|
src: "{{ node_custom_config }}/panko/policy.json"
|
|
dest: "{{ node_config_directory }}/{{ item }}/policy.json"
|
|
with_items:
|
|
- "panko-api"
|
|
when:
|
|
panko_policy.stat.exists
|