fas2discourse: swap copy for fetch in task

Signed-off-by: David Kirwan <dkirwan@redhat.com>
This commit is contained in:
David Kirwan 2023-04-20 12:59:48 +01:00
parent 7949f778d9
commit d9a08c4e55

View file

@ -1,14 +1,13 @@
---
# generate the templates for project to be created
- name: create the templates
ansible.builtin.copy:
- name: fetch keytab to location used in create template step
ansible.builtin.fetch:
src: "/etc/openshift_apps/fas2discourse/fas2discourse{{ env_suffix }}-keytab.kt"
dest: "/root/ocp4/openshift-apps/fas2discourse-operator/fas2discourse-keytab.kt"
remote_src: True
dest: "/etc/openshift_apps/fas2discourse/fas2discourse{{ env_suffix }}-keytab.kt"
mode: 0600
# generate the templates for project to be created
- name: create the templates
- name: copy the templates to the host
template:
src: "secret-keytab.yml"
dest: "/root/ocp4/openshift-apps/fas2discourse-operator/secret-keytab.yml"
@ -16,7 +15,7 @@
vars:
fas2discourse_keytab_file:
"{{ lookup('file',
'/root/ocp4/openshift-apps/fas2discourse-operator/fas2discourse-keytab.kt')
'/etc/openshift_apps/fas2discourse/fas2discourse{{ env_suffix }}-keytab.kt')
}}"
# apply created openshift resources