@installdoc/ansible-gas-station
Version:
An Ansible playbook that provisions your network with software from GitHub Awesome lists, developed with disaster recovery in mind ⛽🔥🤤
16 lines (13 loc) • 546 B
YAML
- name: "Ensure WireGuard profiles are imported"
include_tasks: NetworkManager/WireGuard.yml
when: '"nmconnection" in vpn_connection.file'
- name: "Register the OpenVPN configuration file name without the ovpn extension"
set_fact:
ovpn_name: "{{ vpn_connection.file | regex_replace('.ovpn$', '') }}"
when: '"ovpn" in vpn_connection.file'
- name: "Ensure OpenVPN profiles are imported"
include_tasks: NetworkManager/OpenVPN.yml
when:
- '"ovpn" in vpn_connection.file'
- nmcli_connections.stdout.find(ovpn_name) == -1