Fix path.

This commit is contained in:
yohan 2024-06-15 18:19:14 +02:00
parent d8f5f6c5ea
commit 08f4cf53d0

View File

@ -2,16 +2,17 @@
# Everything in this volume comes from Git. No need to back it up.
- name: Create /mnt/volumes/openvpn-server_conf directory
ansible.builtin.file:
path: "/mnt/volumes/openvpn-server_conf"
path: "/mnt/volumes/openvpn-server_conf/keys"
state: directory
mode: '0755'
recurse: yes
become: true
- name: Extract openvpn keys from secrets.tar.gz.enc
shell: "openssl enc -aes-256-cbc -md md5 -pass env:SECRETS_ARCHIVE_PASSPHRASE -d -in {{ remote_workdir }}/secrets.tar.gz.enc | tar -zxv -C {{ item.dir }} --strip 4 {{ item.name }}"
with_items:
- name: secrets/docker-OpenVPN-server-stack/conf/server_keys/
dir: "/mnt/volumes/openvpn-server_conf"
dir: "/mnt/volumes/openvpn-server_conf/keys"
environment:
SECRETS_ARCHIVE_PASSPHRASE: "{{ lookup('env', 'SECRETS_ARCHIVE_PASSPHRASE') }}"
become: true