feat: move sops rename/restore to a ansible task
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
11 files changed
+105
-245
No files matched your search
@@ -23,15 +23,9 @@
|
|||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template encrypted files
|
- name: Template encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -42,22 +36,10 @@
|
|||||||
mode: "0644"
|
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: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -23,15 +23,9 @@
|
|||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template encrypted files
|
- name: Template encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -42,22 +36,10 @@
|
|||||||
mode: "0644"
|
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: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -23,15 +23,9 @@
|
|||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template encrypted files
|
- name: Template encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -42,22 +36,10 @@
|
|||||||
mode: "0644"
|
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: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -23,15 +23,9 @@
|
|||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template encrypted files
|
- name: Template encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -42,22 +36,10 @@
|
|||||||
mode: "0644"
|
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: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -23,15 +23,9 @@
|
|||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template encrypted files
|
- name: Template encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -42,22 +36,10 @@
|
|||||||
mode: "0644"
|
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: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -23,15 +23,9 @@
|
|||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template encrypted files
|
- name: Template encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -42,22 +36,10 @@
|
|||||||
mode: "0644"
|
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: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -23,15 +23,9 @@
|
|||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
- name: Template encrypted files for {{ addon_namespace }}/{{ addon_name }}
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template encrypted files
|
- name: Template encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -42,22 +36,10 @@
|
|||||||
mode: "0644"
|
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: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -15,18 +15,11 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/ansible/"]
|
with_community.general.filetree: ["../templates/ansible/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
|
||||||
- name: Template Ansible encrypted files
|
- name: Template Ansible encrypted files
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template Ansible encrypted files
|
- name: Template Ansible encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -47,22 +40,10 @@
|
|||||||
loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
|
loop: "{{ bootstrap_nodes.master + bootstrap_nodes.worker | default([]) }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.address }}"
|
label: "{{ item.address }}"
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -15,18 +15,11 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||||
|
|
||||||
# https://github.com/ansible-collections/community.sops/issues/153
|
|
||||||
- name: Template Kubernetes encrypted files
|
- name: Template Kubernetes encrypted files
|
||||||
block:
|
block:
|
||||||
- name: Rename Sops configuration file
|
- name: Disable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml"
|
file: ../sops/disable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml"
|
|
||||||
state: absent
|
|
||||||
- name: Template Kubernetes encrypted files
|
- name: Template Kubernetes encrypted files
|
||||||
when: item.state == 'file' and 'sops' in item.path
|
when: item.state == 'file' and 'sops' in item.path
|
||||||
community.sops.sops_encrypt:
|
community.sops.sops_encrypt:
|
||||||
@@ -37,22 +30,10 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: true
|
force: true
|
||||||
with_community.general.filetree: ["../templates/kubernetes/"]
|
with_community.general.filetree: ["../templates/kubernetes/"]
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
rescue:
|
rescue:
|
||||||
- name: Restore Sops configuration file
|
- name: Enable Sops config
|
||||||
ansible.builtin.copy:
|
ansible.builtin.include_tasks:
|
||||||
src: "{{ repository_path }}/.sops.yaml.orig"
|
file: ../sops/enable.yaml
|
||||||
dest: "{{ repository_path }}/.sops.yaml"
|
|
||||||
mode: "0644"
|
|
||||||
- name: Remove backed up Sops configuration file
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ repository_path }}/.sops.yaml.orig"
|
|
||||||
state: absent
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
|
- name: Rename Sops configuration file
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ repository_path }}/.sops.yaml"
|
||||||
|
dest: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: Remove Sops configuration file
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ repository_path }}/.sops.yaml"
|
||||||
|
state: absent
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
# https://github.com/ansible-collections/community.sops/issues/153
|
||||||
|
- name: Restore Sops configuration file
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
dest: "{{ repository_path }}/.sops.yaml"
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: Remove backed up Sops configuration file
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ repository_path }}/.sops.yaml.orig"
|
||||||
|
state: absent
|
||||||
Reference in new issue
Block a user