diff --git a/roles/wg/tasks/main.yml b/roles/wg/tasks/main.yml index 1443325..f356d99 100644 --- a/roles/wg/tasks/main.yml +++ b/roles/wg/tasks/main.yml @@ -6,11 +6,11 @@ - name: Check for existence of private key ansible.builtin.stat: path: /etc/wireguard/private.key - register: _private_key_stat + register: _private_key - name: Generate keypair ansible.builtin.include_tasks: tasks/generate_keypair.yml - when: not _private_key_stat.exists + when: not _private_key.stat.exists - name: Save private key ansible.builtin.template: @@ -21,7 +21,7 @@ mode: 0700 vars: key: "{{ wg_private_key }}" - when: not _private_key_stat.exists + when: not _private_key.stat.exists - name: Save public key ansible.builtin.template: @@ -32,7 +32,7 @@ mode: 0700 vars: key: "{{ wg_public_key }}" - when: not _private_key_stat.exists + when: not _private_key.stat.exists - name: Set dns_command for co-openSUSE ansible.builtin.set_fact: