File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,12 @@ This role requires an apt based system.
5252
5353A client object is a dictionary that can contain the following keys.
5454
55- | Key | Mandatory? | Description |
56- | ------------ | ------------------------ | ---------------------------------------------------------------------- |
57- | ` name ` | :heavy_check_mark : | Name of the client. Has to be unique. |
58- | ` ip_address ` | :heavy_multiplication_x : | IP address given to the client via ` ifconfig-push ` |
59- | ` netmask ` | :heavy_multiplication_x : | Netmask of that IP address |
60- | ` push ` | :heavy_multiplication_x : | Miscellaneous strings to be used with the ` push ` command to the client |
55+ | Key | Mandatory? | Description |
56+ | ------ | ------------------------ | ---------------------------------------------------------------------- |
57+ | ` name ` | :heavy_check_mark : | Name of the client. Has to be unique. |
58+ | ` ipv4 ` | :heavy_multiplication_x : | IPv4 address given to the client via ` ifconfig-push ` |
59+ | ` ipv6 ` | :heavy_multiplication_x : | IPv6 address given to the client via ` ifconfig-ipv6-push ` |
60+ | ` push ` | :heavy_multiplication_x : | Miscellaneous strings to be used with the ` push ` command to the client |
6161
6262### LDAP
6363
Original file line number Diff line number Diff line change 33 src : staticclient.j2
44 dest : " {{ openvpn_base_dir }}/staticclients/OpenVPN-Client-{{ openvpn_server_hostname[:24] }}-{{ item.name[:24] }}"
55 mode : 644
6- when : item.ip_address is defined
Original file line number Diff line number Diff line change 1- ifconfig-push {{ item.ip_address }} {{ item.netmask }}
1+ {% if item .ipv 4 is defined %}
2+ ifconfig-push {{ item.ipv4 }} {{ openvpn_tunnel_subnetv4 | ansible.utils.ipaddr('netmask') }}
3+ {% endif %}
4+ {% if item .ipv 6 is defined %}
5+ ifconfig-ipv6-push {{ item.ipv6 }}/{{ openvpn_tunnel_subnetv6 | ansible.utils.ipaddr('prefix') }} {{ openvpn_tunnel_subnetv6 | ansible.utils.nthhost(2) }}
6+ {% endif %}
27{% for push_option in item .push | default (openvpn_default_client_push ) %}
38push "{{ push_option }}"
49{% endfor %}
You can’t perform that action at this time.
0 commit comments