fcos-pipeline-migration: ensure templates placed in directory
unique to the app. Signed-off-by: David Kirwan <dkirwan@redhat.com>
This commit is contained in:
parent
c3e206ab1e
commit
bb049d181b
3 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
- name: Create the directories to hold the templates
|
||||
file:
|
||||
path: "/root/ocp4/openshift-apps/"
|
||||
path: "/root/ocp4/openshift-apps/{{project_name}}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
|
@ -11,13 +11,13 @@
|
|||
- name: create the templates
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "/root/ocp4/openshift-apps/{{ item }}"
|
||||
dest: "/root/ocp4/openshift-apps/{{project_name}}/{{ item }}"
|
||||
mode: 0770
|
||||
with_items: "{{ project_templates }}"
|
||||
|
||||
# apply created openshift resources
|
||||
- name: oc apply resources
|
||||
command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/{{ item }}"
|
||||
command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/{{project_name}}/{{ item }}"
|
||||
with_items: "{{ project_templates }}"
|
||||
|
||||
# create the service account
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
appowners: []
|
||||
project_name: sysadmin-openshift
|
||||
project_templates:
|
||||
- group.yaml
|
||||
- rolebinding.yaml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- name: Create the directories to hold the templates
|
||||
file:
|
||||
path: "/root/ocp4/openshift-apps/"
|
||||
path: "/root/ocp4/openshift-apps/{{project_name}}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
|
@ -13,7 +13,7 @@
|
|||
- name: create the templates
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "/root/ocp4/openshift-apps/{{ item }}"
|
||||
dest: "/root/ocp4/openshift-apps/{{project_name}}/{{ item }}"
|
||||
mode: 0770
|
||||
with_items: "{{ project_templates }}"
|
||||
tags:
|
||||
|
@ -21,7 +21,7 @@
|
|||
|
||||
# apply created openshift resources
|
||||
- name: oc apply resources
|
||||
command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/{{ item }}"
|
||||
command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/{{project_name}}/{{ item }}"
|
||||
with_items: "{{ project_templates }}"
|
||||
tags:
|
||||
- create-resources
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue