-
Notifications
You must be signed in to change notification settings - Fork 10
/
push-mw-whitelist.yml
26 lines (21 loc) · 1.02 KB
/
push-mw-whitelist.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
# Push middleware whitelist
# This playbook writes the middleware whitelist to each targeted app host and then executes the
# /opt/scripts/middleware-push-whitelist.sh script to push the config to the middleware
# "run_once: True" is used to execute the push once instead of on each targeted host
# deploy_become_override is used from the Stepup-VM push-mw.sh script to set become to Yes
- name: Push middleware whitelist
hosts: stepup-middleware
become: "{{ deploy_become_override | default('no') }}"
remote_user: "{{ app_deploy_user }}"
tasks:
- name: Write middleware config and whitelist to /opt/scripts/
template: src={{ inventory_dir }}/templates/middleware/{{ item }}.j2 dest=/opt/scripts/{{ item }} mode="400" backup=yes
with_items:
- middleware-config.json
- middleware-whitelist.json
- middleware-institution.json
# The /opt/scripts/middleware-* scripts were written by middleware deploy
- name: Push middleware whitelist
command: /opt/scripts/middleware-push-whitelist.sh
run_once: True