--- - name: Install OpenVPN ansible.builtin.apt: name: openvpn - name: Deploy OpenVPN configuration ansible.builtin.template: src: openvpn/client.conf.j2 dest: /etc/openvpn/client.conf mode: '0644' - name: Deploy OpenVPN CA cert ansible.builtin.copy: content: "{{ openvpn_ca }}" dest: /etc/openvpn/ca.crt mode: '0644' - name: Deploy OpenVPN TLS auth ansible.builtin.copy: content: "{{ openvpn_ta }}" dest: /etc/openvpn/ta.key mode: '0600' - name: Deploy OpenVPN client cert ansible.builtin.copy: content: "{{ openvpn_cert }}" dest: /etc/openvpn/client.crt mode: '0644' - name: Deploy OpenVPN client key ansible.builtin.copy: content: "{{ openvpn_key }}" dest: /etc/openvpn/client.key mode: '0600' - name: Start OpenVPN ansible.builtin.systemd: name: "openvpn@client.service" state: started enabled: true