Skip to content

Commit

Permalink
add backup playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 28, 2023
1 parent 8d45f99 commit a1a94f8
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions playbooks/networkid_pk_backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,12 @@
ansible.builtin.set_fact:
subdomain: "{{ inventory_hostname.split('.')[0] }}"

# - name: Backup secrets from servers to local storage
# become: True
# become_user: root
# ansible.builtin.copy:
# src: "{{ network_dir.files[0].path }}/network/secret_ed25519"
# dest: "/opt/backup/{{ subdomain }}_secret_ed25519"
# owner: root
# group: root
# mode: 0600
# remote_src: True
# when: network_dir.matched > 0
# tags: backup

- name: Backup secrets from servers to local storage
become: True
become_user: root
ansible.builtin.fetch:
src: "{{ network_dir.files[0].path }}/network/secret_ed25519"
dest: "/opt/backup/{{ subdomain }}_secret_ed25519"
dest: "/opt/backup/{{ subdomain }}secret_ed25519"
flat: yes

Check warning on line 25 in playbooks/networkid_pk_backup.yaml

View workflow job for this annotation

GitHub Actions / build (3.10)

25:15 [truthy] truthy value should be one of [False, True]
when: network_dir.matched > 0
tags: backup
Expand Down

0 comments on commit a1a94f8

Please sign in to comment.