forked from infra/ansible
setup handlers, so ansible-lint is happy
Signed-off-by: Vít Smolík <me@smoliicek.cz>
This commit is contained in:
parent
a7ce1173a6
commit
7b4774117d
2 changed files with 20 additions and 17 deletions
20
roles/openshift/cluster/handlers/main.yml
Normal file
20
roles/openshift/cluster/handlers/main.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
- name: Apply base resources
|
||||
ansible.builtin.command: "oc apply --validate=strict -f {{ cluster_filepath }}/{{ item }}"
|
||||
with_items:
|
||||
- sysadmin-openshift-group.yml
|
||||
- sysadmin-openshift-rolebinding.yml
|
||||
- webhooks-clusterrolebinding.yml
|
||||
- forward-logs-to-log01.yml
|
||||
tags:
|
||||
- create-resources
|
||||
|
||||
- name: Apply staging resources
|
||||
ansible.builtin.command: "oc apply --validate=strict -f {{ cluster_filepath }}/{{ item }}"
|
||||
with_items:
|
||||
- sysadmin-readonly-group.yml
|
||||
- sysadmin-readonly-rolebinding.yml
|
||||
- sysadmin-readonly-role.yml
|
||||
when: env == "staging"
|
||||
tags:
|
||||
- create-resources
|
||||
|
|
@ -40,20 +40,3 @@
|
|||
when: env == "staging"
|
||||
tags:
|
||||
- create-resources
|
||||
|
||||
# apply created openshift resources
|
||||
- name: Oc apply base resources
|
||||
ansible.builtin.command: "oc apply --validate=strict -f {{ item.dest }}"
|
||||
with_items: "{{ cluster_template_result_base.results }}"
|
||||
when: item.changed
|
||||
tags:
|
||||
- create-resources
|
||||
|
||||
- name: Oc apply stg-only resources
|
||||
ansible.builtin.command: "oc apply --validate=strict -f {{ item.dest }}"
|
||||
with_items: "{{ cluster_template_result_staging.results }}"
|
||||
when:
|
||||
- item.changed
|
||||
- env == "staging"
|
||||
tags:
|
||||
- create-resources
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue