This commit is contained in:
yohan 2024-10-06 16:59:06 +02:00
parent 2f7567b206
commit 78fca84cb7

View File

@ -17,7 +17,7 @@
- name: Check if key file already exists
stat:
path: /usr/local/docker-mounted-files/temp-openvpn-server/temp-p2p-shared.key
register: temp_p2p_shared_key
register: file_temp_p2p_shared_key
become: true
- name: Generate temporary P2P shared key
@ -25,7 +25,7 @@
cmd: "podman run --rm -i {{ private_registry_domain }}/openvpn:176450680a --genkey secret"
register: openvpn_genkey_result
become: true
when: not temp_p2p_shared_key.stat.exists
when: not file_temp_p2p_shared_key.stat.exists
- name: Template key file
ansible.builtin.template:
@ -40,7 +40,7 @@
- temp-p2p-shared.key
vars:
temp_p2p_shared_key: "{{ openvpn_genkey_result.stdout }}"
when: not temp_p2p_shared_key.stat.exists
when: not file_temp_p2p_shared_key.stat.exists
- name: Register key file
command: cat /usr/local/docker-mounted-files/temp-openvpn-server/temp-p2p-shared.key