Enable static IP for client
Closed this issue · 1 comments
mikysal78 commented
howto setting ip static for clients?
thanks.
nkakouros commented
This is a snippet I use:
openvpn_client_config_dir: /etc/openvpn/client
...
- name: Add static ip config
copy:
content:
ifconfig-push {{ network.vpn_range | ipaddr(item.0 + 2) | ipaddr('address') }} {{ network.vpn_range | ipaddr('netmask') }}
dest: "/etc/openvpn/client/{{ item.1 }}"
owner: nobody
group: nogroup
loop: "{{ lookup('indexed_items', openvpn_clients) }}"