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
|
||||
template:
|
||||
src: "wg0-client.conf"
|
||||
dest: "~/wg/{{ item.item }}/wg0-client.conf"
|
||||
dest: "~/wg/{{ item.1.item }}/wg0-client.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
with_items: "{{ vpn_client_private_keys.results }}"
|
||||
with_indexed_items: "{{ vpn_client_private_keys.results }}"
|
||||
|
||||
- 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
[Interface]
|
||||
Address = {{ vpn_network }}.{{item|int + 2}}/32
|
||||
Address = {{ vpn_network }}.{{item.0 + 2}}/32
|
||||
DNS = {{ dns_for_clients }}
|
||||
PrivateKey = {{ item.stdout }}
|
||||
PrivateKey = {{ item.1.stdout }}
|
||||
|
||||
[Peer]
|
||||
PublicKey = {{ vpn_server_public_key.stdout }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user