Skip to content

Commit

Permalink
vpn-wireguard: fixed minor lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arodier committed Apr 6, 2024
1 parent a3bbb10 commit c2a52e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions roles/vpn-wireguard/tasks/backup/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

- name: Store the public and the private keys in the password store
when: creds.store == 'community.general.passwordstore'
tags: backup
block:
- name: Store the private key
no_log: '{{ hide_secrets }}'
Expand All @@ -33,12 +34,12 @@
_: >-
{{ lookup(creds.store, creds.prefix + "/wireguard/public-key",
create=true, missing="create", userpass=public_key) }}
tags: backup
- name: Store the public and the private keys in plain text files
when: creds.store == 'ansible.builtin.password'
delegate_to: localhost
become: false
tags: backup
block:
- name: Create credentials directory
ansible.builtin.file:
Expand All @@ -56,4 +57,3 @@
content: '{{ public_key }}'
dest: '{{ backup_directory }}/wireguard/public-key'
mode: '0600'
tags: backup
4 changes: 2 additions & 2 deletions roles/vpn-wireguard/tasks/restore/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---

- name: load the public key from the credentials store
- name: Load the public key from the credentials store
ansible.builtin.set_fact:
public_key: >-
{{ lookup(creds.store, creds.prefix + "/wireguard/public-key") }}
tags: restore

- name: load the private key from the credentials store
- name: Load the private key from the credentials store
no_log: '{{ hide_secrets }}'
ansible.builtin.set_fact:
private_key: >-
Expand Down

0 comments on commit c2a52e5

Please sign in to comment.