Improvements for ansible-linting

This commit is contained in:
2023-05-04 01:44:18 -04:00
parent dfd93dd5f8
commit 9142254a57
13 changed files with 49 additions and 23 deletions

View File

@@ -5,7 +5,9 @@
update_cache: true
- name: Generate WireGuard keys
ansible.builtin.shell: wg genkey | tee privatekey | wg pubkey > publickey
ansible.builtin.shell: |
set -o pipefail
wg genkey | tee privatekey | wg pubkey > publickey
args:
chdir: /etc/wireguard/
creates: /etc/wireguard/privatekey
@@ -19,8 +21,8 @@
ansible.builtin.template:
src: wireguard.j2
dest: /etc/wireguard/wg0.conf
notify:
- restart_wireguard
mode: 0400
notify: restart_wireguard
- name: Start WireGuard interface
ansible.builtin.service: