fix linting
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2022-10-11 09:48:42 +02:00
parent cf02110610
commit 6a71faa307
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 4 additions and 4 deletions

View File

@ -17,9 +17,9 @@
- name: Generate WireGuard private key
command: "wg genkey"
register: __wireguard_private_key_gen
changed_when: false
changed_when: False
- name: Set private key fact
- name: Set generated private key
set_fact:
wireguard_private_key: "{{ __wireguard_private_key_gen.stdout }}"
when:
@ -34,7 +34,7 @@
src: "/etc/wireguard/{{ wireguard_interface }}.conf"
register: __wireguard_config
- name: Set private key fact
- name: Set existing private key
set_fact:
wireguard_private_key: "{{ __wireguard_config['content'] | b64decode | regex_findall('PrivateKey = (.*)') | first }}"
when:

View File

@ -52,7 +52,7 @@ AllowedIPs = {{ hostvars[host].wireguard_address.split('/')[0] }}/32
{% if hostvars[host].wireguard_persistent_keepalive is defined %}
PersistentKeepalive = {{ hostvars[host].wireguard_persistent_keepalive }}
{% endif %}
{% if hostvars[host].wireguard_endpoint is not defined or hostvars[host].wireguard_endpoint != "" %}
{% if hostvars[host].wireguard_endpoint is not defined or not hostvars[host].wireguard_endpoint %}
Endpoint = {{ hostvars[host].wireguard_endpoint | default(host) }}:{{ hostvars[host].wireguard_port | default(wireguard_port) }}
{% endif %}
{% endif %}