fix: set permissions on files to 0644
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
9 files changed
+42
-95
No files matched your search
@@ -17,7 +17,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove Sops configuration file
|
- name: Remove Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
encrypted_regex: ^(data|stringData)$
|
encrypted_regex: ^(data|stringData)$
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
- name: Restore Sops configuration file
|
- name: Restore Sops configuration file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove Sops configuration file
|
- name: Remove Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
encrypted_regex: ^(data|stringData)$
|
encrypted_regex: ^(data|stringData)$
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
- name: Restore Sops configuration file
|
- name: Restore Sops configuration file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove Sops configuration file
|
- name: Remove Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
encrypted_regex: ^(data|stringData)$
|
encrypted_regex: ^(data|stringData)$
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
- name: Restore Sops configuration file
|
- name: Restore Sops configuration file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove Sops configuration file
|
- name: Remove Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
encrypted_regex: ^(data|stringData)$
|
encrypted_regex: ^(data|stringData)$
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
- name: Restore Sops configuration file
|
- name: Restore Sops configuration file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove Sops configuration file
|
- name: Remove Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
encrypted_regex: ^(data|stringData)$
|
encrypted_regex: ^(data|stringData)$
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
- name: Restore Sops configuration file
|
- name: Restore Sops configuration file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
dest: "{{ repository_path }}/kubernetes/apps/{{ addon_namespace }}/{{ addon_name }}/{{ item.path | replace('.j2', '') }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove Sops configuration file
|
- name: Remove Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
encrypted_regex: ^(data|stringData)$
|
encrypted_regex: ^(data|stringData)$
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
with_community.general.filetree: ["../templates/addons/{{ addon_name }}/"]
|
||||||
- name: Restore Sops configuration file
|
- name: Restore Sops configuration file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ repository_path }}/ansible/{{ item.path | regex_replace('.j2$', '') }}"
|
dest: "{{ repository_path }}/ansible/{{ item.path | regex_replace('.j2$', '') }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/ansible/"]
|
with_community.general.filetree: ["../templates/ansible/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove Sops configuration file
|
- name: Remove Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
encrypted_regex: ^(data|stringData)$
|
encrypted_regex: ^(data|stringData)$
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/ansible/"]
|
with_community.general.filetree: ["../templates/ansible/"]
|
||||||
- name: Template encrypted node secrets
|
- name: Template encrypted node secrets
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
path: "{{ repository_path }}/ansible/inventory/host_vars/{{ item.name }}.sops.yaml"
|
path: "{{ repository_path }}/ansible/inventory/host_vars/{{ item.name }}.sops.yaml"
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', 'templates/node.sops.yaml.j2', template_vars=dict(password=item.password)) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', 'templates/node.sops.yaml.j2', template_vars=dict(password=item.password)) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
|
loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
@@ -61,61 +61,8 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
# - name: Template Ansible configuration
|
|
||||||
# ansible.builtin.template:
|
|
||||||
# src: "{{ item.src }}"
|
|
||||||
# dest: "{{ repository_path }}/{{ item.dest }}"
|
|
||||||
# mode: "0755"
|
|
||||||
# loop:
|
|
||||||
# - src: templates/ansible/supplemental.yaml.j2
|
|
||||||
# dest: ./ansible/inventory/group_vars/kubernetes/supplemental.yaml
|
|
||||||
# - src: templates/ansible/hosts.yaml.j2
|
|
||||||
# dest: ./ansible/inventory/hosts.yaml
|
|
||||||
|
|
||||||
# # https://github.com/ansible-collections/community.sops/issues/153
|
|
||||||
# - name: Template Ansible encrypted files
|
|
||||||
# block:
|
|
||||||
# - name: Rename Sops configuration file
|
|
||||||
# ansible.builtin.copy:
|
|
||||||
# src: "{{ repository_path }}/.sops.yaml"
|
|
||||||
# dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
# mode: "0755"
|
|
||||||
# - name: Remove Sops configuration file
|
|
||||||
# ansible.builtin.file:
|
|
||||||
# path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
# state: absent
|
|
||||||
# - name: Template encrypted node secrets
|
|
||||||
# community.sops.sops_encrypt:
|
|
||||||
# path: "{{ repository_path }}/ansible/inventory/host_vars/{{ item.name }}.sops.yaml"
|
|
||||||
# age: ["{{ bootstrap_age_public_key }}"]
|
|
||||||
# content_yaml: "{{ lookup('ansible.builtin.template', 'templates/ansible/node.sops.yaml.j2', template_vars=dict(password=item.password)) | from_yaml }}"
|
|
||||||
# mode: "0755"
|
|
||||||
# force: true
|
|
||||||
# loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
|
|
||||||
# loop_control:
|
|
||||||
# label: "{{ item.address }}"
|
|
||||||
# - name: Restore Sops configuration file
|
|
||||||
# ansible.builtin.copy:
|
|
||||||
# src: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
# dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
# mode: "0755"
|
|
||||||
# - name: Remove backed up Sops configuration file
|
|
||||||
# ansible.builtin.file:
|
|
||||||
# path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
# state: absent
|
|
||||||
# rescue:
|
|
||||||
# - name: Restore Sops configuration file
|
|
||||||
# ansible.builtin.copy:
|
|
||||||
# src: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
# dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
# mode: "0755"
|
|
||||||
# - name: Remove backed up Sops configuration file
|
|
||||||
# ansible.builtin.file:
|
|
||||||
# path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
# state: absent
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ repository_path }}/kubernetes/{{ item.path | regex_replace('.j2$', '') }}"
|
dest: "{{ repository_path }}/kubernetes/{{ item.path | regex_replace('.j2$', '') }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove Sops configuration file
|
- name: Remove Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
@@ -34,14 +34,14 @@
|
|||||||
encrypted_regex: ^(data|stringData)$
|
encrypted_regex: ^(data|stringData)$
|
||||||
age: ["{{ bootstrap_age_public_key }}"]
|
age: ["{{ bootstrap_age_public_key }}"]
|
||||||
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
content_yaml: "{{ lookup('ansible.builtin.template', item.src) | from_yaml }}"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||||
- name: Restore Sops configuration file
|
- name: Restore Sops configuration file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
- name: Remove backed up Sops configuration file
|
- name: Remove backed up Sops configuration file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "templates/.sops.yaml.j2"
|
src: "templates/.sops.yaml.j2"
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
mode: "0755"
|
mode: "0644"
|
||||||
Reference in new issue
Block a user