feat: set lstrip on ansible template task and remove comments (#1155)
* feat: set lstrip on ansible template task and remove comments Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: cert-manager block was neing stripped Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
ef44ea1b2b
commit
a4731906d9
82 files changed
+166
-244
No files matched your search
@@ -20,6 +20,7 @@
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ repository_path }}/kubernetes/{{ item.path | regex_replace('.j2$', '') }}"
|
||||
mode: "0644"
|
||||
lstrip_blocks: true
|
||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
@@ -38,6 +39,7 @@
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ repository_path }}/kubernetes/{{ item.path | regex_replace('.j2$', '') }}"
|
||||
mode: "0644"
|
||||
lstrip_blocks: true
|
||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
@@ -56,23 +58,22 @@
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ repository_path }}/kubernetes/{{ item.path | regex_replace('.j2$', '') }}"
|
||||
mode: "0644"
|
||||
lstrip_blocks: true
|
||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
||||
- name: Template Kubernetes encrypted files
|
||||
block:
|
||||
- name: Template Kubernetes encrypted files
|
||||
when:
|
||||
- "item.state == 'file'"
|
||||
- "'sops' in item.path"
|
||||
community.sops.sops_encrypt:
|
||||
path: "{{ repository_path }}/kubernetes/{{ item.path | replace('.j2', '') }}"
|
||||
encrypted_regex: ^(data|stringData)$
|
||||
age: ["{{ bootstrap_age_public_key }}"]
|
||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||
mode: "0644"
|
||||
force: true
|
||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
when:
|
||||
- "item.state == 'file'"
|
||||
- "'sops' in item.path"
|
||||
community.sops.sops_encrypt:
|
||||
path: "{{ repository_path }}/kubernetes/{{ item.path | replace('.j2', '') }}"
|
||||
encrypted_regex: ^(data|stringData)$
|
||||
age: ["{{ bootstrap_age_public_key }}"]
|
||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src, lstrip_blocks=true) | from_yaml }}"
|
||||
mode: "0644"
|
||||
force: true
|
||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
Reference in new issue
Block a user