Compare commits
1 Commits
0.4.1
...
transcaffe
| Author | SHA1 | Date | |
|---|---|---|---|
|
4e04c508db
|
@@ -1,6 +1,6 @@
|
|||||||
namespace: finallycoffee
|
namespace: finallycoffee
|
||||||
name: base
|
name: base
|
||||||
version: 0.4.1
|
version: 0.4.0
|
||||||
readme: README.md
|
readme: README.md
|
||||||
authors:
|
authors:
|
||||||
- transcaffeine <transcaffeine@finally.coffee>
|
- transcaffeine <transcaffeine@finally.coffee>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Configure wireguard interfaces with wg_quick
|
- name: Configure wireguard interfaces with wg_quick
|
||||||
hosts: "{{ wg_quick_hosts | default('wg_quick') }}"
|
hosts: "{{ wg_quick_hosts | default(wg_quick) }}"
|
||||||
become: "{{ wg_quick_become | default(false) }}"
|
become: "{{ wg_quick_become | default(false) }}"
|
||||||
gather_facts: "{{ wg_quick_gather_facts | default(false) }}"
|
gather_facts: "{{ wg_quick_gather_facts | default(false) }}"
|
||||||
roles:
|
roles:
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
# `finallycoffee.base.wg_quick` ansible role
|
|
||||||
|
|
||||||
Configure a wireguard interface using `wg_quick`. This role writes
|
|
||||||
the configuration files and activates the interface using the systemd
|
|
||||||
template service abstractions.
|
|
||||||
@@ -17,9 +17,3 @@
|
|||||||
state: >-2
|
state: >-2
|
||||||
{{ (wg_quick_iface.state | default(wg_quick_state) == 'present')
|
{{ (wg_quick_iface.state | default(wg_quick_state) == 'present')
|
||||||
| ternary('started', 'absent') }}
|
| ternary('started', 'absent') }}
|
||||||
|
|
||||||
- name: Ensure wg-quick configuration for interface '{{ wg_quick_iface.name }}' is absent
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ wg_quick_configuration_dir }}/{{ wg_quick_face.name }}.conf"
|
|
||||||
state: "absent"
|
|
||||||
when: wg_quick_iface.state | default(wg_quick_state) == 'absent'
|
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure wg_quick_state is valid
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: >-2
|
|
||||||
Invalid state '{{ wg_quick_state }}'. Valid
|
|
||||||
states are {{ wg_quick_states | join(', ') }}.
|
|
||||||
when: wg_quick_state not in wg_quick_states
|
|
||||||
|
|
||||||
- name: Ensure system packages are available
|
- name: Ensure system packages are available
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ wg_quick_system_packages }}"
|
name: "{{ wg_quick_system_packages }}"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ PrivateKey = {{ wg_quick_iface.private_key }}
|
|||||||
PrivateKeyFile = {{ wg_quick_iface.private_key_file }}
|
PrivateKeyFile = {{ wg_quick_iface.private_key_file }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if wg_quick_iface.table is defined %}
|
{% if wg_quick_iface.table is defined %}
|
||||||
Table = {{ wg_quick_iface.table | ternary('on', 'off') }}
|
Table = {{ wg_quick_iface.table | ternary('On', 'Off') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if wg_quick_iface.post_up %}
|
{% if wg_quick_iface.post_up %}
|
||||||
PostUp = /bin/bash -c "{{ wg_quick_iface.post_up | join('; ') }}"
|
PostUp = /bin/bash -c "{{ wg_quick_iface.post_up | join('; ') }}"
|
||||||
@@ -26,7 +26,4 @@ AllowedIPs = {{ _peer.allowed_ips | join(', ') }}
|
|||||||
{% if _peer.persistent_keepalive %}
|
{% if _peer.persistent_keepalive %}
|
||||||
PersistentKeepalive = {{ _peer.persistent_keepalive }}
|
PersistentKeepalive = {{ _peer.persistent_keepalive }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if 'psk' in _peer %}
|
|
||||||
PresharedKey = {{ _peer.psk }}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
wg_quick_states:
|
|
||||||
- "present"
|
|
||||||
- "absent"
|
|
||||||
Reference in New Issue
Block a user