Bugfix: Iterating over clients now increment ip numbers ...
This commit is contained in:
parent
0ba0c1ae16
commit
5dd380bcf1
@ -61,11 +61,11 @@
|
|||||||
- name: generate client configs
|
- name: generate client configs
|
||||||
template:
|
template:
|
||||||
src: "wg0-client.conf"
|
src: "wg0-client.conf"
|
||||||
dest: "~/wg/{{ item.item }}/wg0-client.conf"
|
dest: "~/wg/{{ item.1.item }}/wg0-client.conf"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0600
|
mode: 0600
|
||||||
with_items: "{{ vpn_client_private_keys.results }}"
|
with_indexed_items: "{{ vpn_client_private_keys.results }}"
|
||||||
|
|
||||||
- name: generate qr codes for client configs
|
- name: generate qr codes for client configs
|
||||||
shell: umask 077; qrencode --type=PNG --output=/root/wg/{{ item }}/wg0-client.png < ~/wg/{{ item }}/wg0-client.conf
|
shell: umask 077; qrencode --type=PNG --output=/root/wg/{{ item }}/wg0-client.png < ~/wg/{{ item }}/wg0-client.conf
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Interface]
|
[Interface]
|
||||||
Address = {{ vpn_network }}.{{item|int + 2}}/32
|
Address = {{ vpn_network }}.{{item.0 + 2}}/32
|
||||||
DNS = {{ dns_for_clients }}
|
DNS = {{ dns_for_clients }}
|
||||||
PrivateKey = {{ item.stdout }}
|
PrivateKey = {{ item.1.stdout }}
|
||||||
|
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = {{ vpn_server_public_key.stdout }}
|
PublicKey = {{ vpn_server_public_key.stdout }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user