diff --git a/playbooks/networkid_pk_backup.yaml b/playbooks/networkid_pk_backup.yaml index 90661d6..278df42 100644 --- a/playbooks/networkid_pk_backup.yaml +++ b/playbooks/networkid_pk_backup.yaml @@ -22,14 +22,13 @@ ansible.builtin.shell: | /bin/bash -c "set -o pipefail; journalctl -u {{ default_service }} -n 100000 | grep 'Local node identity is:' | tail -1 | awk '{print \$NF}'" register: networkid - ignore_errors: true + ignore_errors: True when: network_dir.matched > 0 - # print - name: Print networkid ansible.builtin.debug: msg: "Network ID: {{ networkid.stdout | trim }}" - when: network_dir.matched > 0 and networkid.stdout != "" + when: network_dir.matched > 0 and networkid.stdout - name: Backup secrets from servers to local storage become: True @@ -38,6 +37,6 @@ src: "{{ network_dir.files[0].path }}/network/secret_ed25519" dest: "/opt/backup/{{ subdomain }}_{{ networkid.stdout | trim }}_secret_ed25519" flat: yes - when: network_dir.matched > 0 and networkid.stdout != "" + when: network_dir.matched > 0 and networkid.stdout tags: backup ...