Stouts / Stouts.openvpn

Ansible role to install and configure OpenVPN server
MIT License
287 stars 207 forks source link

Task 'Setup bridge' not executed when 'openvpn_bridge' is populated #154

Closed apiening closed 4 years ago

apiening commented 4 years ago

I have set the following options for my bridge based setup:

"openvpn_bridge": {
        "address": "192.168.10.254",
        "broadcast": "192.168.10.255",
        "dhcp_end": "192.168.10.100",
        "dhcp_start": "192.168.10.20",
        "netmask": "255.255.255.0",
        "network": "192.168.10.0"
    }

From my expectation the task Setup bridge from the the file tasks/system/bridge/Debian.yml should be executed. I am on a Debian system and the file is included, however the filter openvpn_bridge | bool is evaluated to false. I have checked this with a debug statement in my playbook where I echo the var openvpn_bridge and openvpn_bridge | bool.

I would expect something like

when: openvpn_bridge is defined and openvpn_bridge|length > 0

would be a valid filter to check if the dictionary is popolated.

Or do I misunderstand the meaning of the variable openvpn_bridge? Is there a working example for bridged based setups then?