Skip to content

Commit a0645a9

Browse files
committed
persist zenith proxy ssh keys on control state volume
1 parent 1a916f4 commit a0645a9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

roles/zenith_proxy/tasks/main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@
5151
become: true
5252
register: zenith_proxy_client_config_file
5353

54-
- name: Create podman volume to persist SSH key
55-
containers.podman.podman_volume:
56-
name: "{{ zenith_proxy_service_name }}-ssh"
54+
- name: Create directory to persist SSH key
55+
file:
56+
path: "{{ appliances_state_dir }}/{{ zenith_proxy_service_name }}-ssh"
57+
state: directory
58+
owner: "{{ zenith_proxy_podman_user }}"
59+
group: "{{ zenith_proxy_podman_user }}"
5760
become: true
58-
become_user: "{{ zenith_proxy_podman_user }}"
5961

6062
- name: Initialise Zenith client
6163
# Use a foreground command rather than the podman_container module as I could not
@@ -65,7 +67,7 @@
6567
--name {{ zenith_proxy_service_name }}-init
6668
--replace
6769
--volume /etc/zenith/{{ zenith_proxy_service_name }}:/etc/zenith:ro
68-
--volume {{ zenith_proxy_service_name }}-ssh:/home/zenith/.ssh
70+
--volume {{ appliances_state_dir }}/{{ zenith_proxy_service_name }}-ssh:/home/zenith/.ssh
6971
{{ zenith_proxy_client_image }}
7072
zenith-client init
7173
become: true

0 commit comments

Comments
 (0)