2 - name: Generate user vpn config files
8 - name: Check user ovpn file existence
10 path: "{{ nordix_openvpn_clientconfig }}/files/{{ client_name }}.ovpn"
11 register: user_ovpn_file
12 delegate_to: localhost
14 - name: Fail the deployment
17 - "{{ client_name }}.ovpn file already exist under '{{ nordix_openvpn_clientconfig }}/files/{{ client_name }}.ovpn' or Client name is not defined"
18 when: client_name is not defined and client_name | length > 0 or user_ovpn_file.stat.exists
21 - {role: generate-user-ovpn, when: client_name is defined and client_name | length > 0}