actually put osbs_secret_files on the FS
Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
parent
dbac87c5f8
commit
099bd98b1b
1 changed files with 4 additions and 21 deletions
|
@ -1,34 +1,17 @@
|
|||
---
|
||||
- set_fact:
|
||||
osbs_secret_files_exist: true
|
||||
tags:
|
||||
- oc
|
||||
|
||||
- set_fact:
|
||||
osbs_secret_files_exist: false
|
||||
when: lookup('file', lookup('first_found', [item.source, '/dev/null'])) == ''
|
||||
- name: place osbs_secret_files if they do not exist
|
||||
copy:
|
||||
src: "{{item.source}}"
|
||||
dest: "{{item.dest}}"
|
||||
with_items: "{{ osbs_secret_files }}"
|
||||
tags:
|
||||
- oc
|
||||
|
||||
- fail:
|
||||
msg: Some of the source secret files do not exist (and osbs_secret_can_fail is false)
|
||||
when: not (osbs_secret_files_exist or osbs_secret_can_fail)
|
||||
tags:
|
||||
- oc
|
||||
|
||||
- debug:
|
||||
msg: Some of the source secret files do not exist, skipping import
|
||||
when: not osbs_secret_files_exist
|
||||
tags:
|
||||
- oc
|
||||
|
||||
- name: create secrets resource file
|
||||
template:
|
||||
src: openshift-secret.yml.j2
|
||||
dest: "{{ osbs_secret_remote_dir }}/openshift-secret-{{ inventory_hostname }}-{{ osbs_namespace }}-{{ osbs_secret_name }}.yml"
|
||||
mode: "0600"
|
||||
when: osbs_secret_files_exist
|
||||
notify:
|
||||
- import osbs secret
|
||||
- delete secret resource file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue