Files
fedora-infra_ansible/roles/openshift/sysadmin-openshift/tasks/resources.yaml
Ryan Lerch 47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00

29 lines
874 B
YAML

---
- name: Create the directories to hold the templates
ansible.builtin.file:
path: "/root/ocp4/openshift-apps/{{sysadmin_openshift_project_name}}"
state: directory
owner: root
group: root
mode: "0770"
recurse: yes
tags:
- create-resources
# generate the templates for project to be created
- name: Create the templates
ansible.builtin.template:
src: "{{ item }}"
dest: "/root/ocp4/openshift-apps/{{sysadmin_openshift_project_name}}/{{ item }}"
mode: "0770"
with_items: "{{ sysadmin_openshift_project_templates }}"
tags:
- create-resources
# apply created openshift resources
- name: Oc apply resources
ansible.builtin.command: "/root/bin/oc apply -f /root/ocp4/openshift-apps/{{sysadmin_openshift_project_name}}/{{ item }}"
with_items: "{{ sysadmin_openshift_project_templates }}"
tags:
- create-resources