--- - name: Check whether the OpenVPN server certificate exists ansible.builtin.stat: path: "{{ openvpn_pki_certificate_dir }}/server.crt" register: openvpn_pki_server_certificate - name: Issue the initial OpenVPN server certificate ansible.builtin.command: argv: - /usr/bin/flock - -n - /run/lock/openbao-vpn-cert.lock - "{{ openvpn_pki_script_directory }}/openbao-vpn-cert.sh" - "{{ openvpn_pki_config_path }}" - --skip-openvpn-restart when: not openvpn_pki_server_certificate.stat.exists register: openvpn_pki_initial_certificate changed_when: "'CERTIFICATE_INSTALLED' in openvpn_pki_initial_certificate.stdout" notify: Restart openvpn