43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
---
|
|
- name: begining chart deployments
|
|
run_once: true
|
|
tags:
|
|
- k8s
|
|
- k8s-apply-manifests
|
|
block:
|
|
|
|
- name: apply remote manifests
|
|
ansible.builtin.get_url:
|
|
url: "{{ item.source }}"
|
|
timeout: 120
|
|
dest: "{{ k8s_manifests_path }}/{{ item.name }}.yaml"
|
|
owner: root
|
|
group: root
|
|
mode: 0600
|
|
loop: "{{ k8s_manifests }}"
|
|
when:
|
|
- item.type == "url"
|
|
- item.source is defined
|
|
|
|
- name: apply local manifests
|
|
ansible.builtin.copy:
|
|
src: "manifests/{{ item.source }}"
|
|
dest: "{{ k8s_manifests_path }}/{{ item.name }}.yaml"
|
|
owner: root
|
|
group: root
|
|
mode: 0600
|
|
loop: "{{ k8s_manifests }}"
|
|
when:
|
|
- item.type == "file"
|
|
- item.source is defined
|
|
|
|
- name: apply template manifests
|
|
ansible.builtin.template:
|
|
src: "templates/{{ item.source }}.j2"
|
|
dest: "{{ k8s_manifests_path }}/{{ item.name }}.yaml"
|
|
mode: 0600
|
|
loop: "{{ k8s_manifests }}"
|
|
when:
|
|
- item.type == "template"
|
|
- item.source is defined
|