diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-09-10 08:48:57 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-09-10 08:48:57 +0200 |
commit | 46934bb125c6b3fc53b1669cb5131f9c2f06ac0e (patch) | |
tree | 9a9b5032c922f8241b6821b58fd2629e72003057 /ansible/roles | |
parent | 918d066bfdee300e87a4c5777de6125bf62c76b2 (diff) | |
download | infra-46934bb125c6b3fc53b1669cb5131f9c2f06ac0e.tar.gz infra-46934bb125c6b3fc53b1669cb5131f9c2f06ac0e.tar.bz2 infra-46934bb125c6b3fc53b1669cb5131f9c2f06ac0e.tar.xz infra-46934bb125c6b3fc53b1669cb5131f9c2f06ac0e.zip |
wg0: Adding malabaricus.
Diffstat (limited to 'ansible/roles')
-rw-r--r-- | ansible/roles/wireguard/tasks/main.yml | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/ansible/roles/wireguard/tasks/main.yml b/ansible/roles/wireguard/tasks/main.yml index 787c67c..62d64ce 100644 --- a/ansible/roles/wireguard/tasks/main.yml +++ b/ansible/roles/wireguard/tasks/main.yml @@ -12,12 +12,23 @@ - name: Install packages tags: packages apt: - name: "{{ items }}" - install_recommends: no - vars: - items: + name: - wireguard - - "{{ 'linux-headers-amd64' if ansible_architecture == 'x86_64' else 'linux-headers-686-pae' }}" + install_recommends: no + - name: Install packages (amd64) + tags: packages + apt: + name: + - linux-headers-amd64 + install_recommends: no + when: ansible_architecture == 'x86_64' + - name: Install packages (i686) + tags: packages + apt: + name: + - linux-headers-i686-pae + install_recommends: no + when: ansible_architecture == 'i686' - name: systemctl enable systemd-networkd systemd: @@ -153,25 +164,3 @@ when: links[wg_net.if] is defined vars: links: "{{ ip_link.stdout | from_json | items2dict(key_name='ifname', value_name='ifname') }}" - -- name: generate dns records - tags: -# - wireguard -# - wireguard-dns-records - - never - local_action: - module: copy - content: | - wireguard_dns_records_{{ wg_net.if }}: - {% for c in wireguard__clients|sort %} - {% set client = wireguard__clients[c] %} - - type: A - name: {{ c }} - value: {{ client.ipv4 }} - state: {{ client.state }} - - type: AAAA - name: {{ c }} - value: {{ client.ipv6 }} - state: {{ client.state }} - {% endfor %} - dest: "files/wireguard-dns-records-{{ wg_net.if }}.yml" |