Skip to content
Snippets Groups Projects
Commit d56ca86d authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Merge branch 'fix-ssh-host-key-role' into 'feat-hpc-factory'

Fix ssh host key role

See merge request rc/hpc-factory!148
parents 09006eef be66a996
No related branches found
No related tags found
No related merge requests found
---
- name: Ensure destination directory exists only if not present
file:
ansible.builtin.file:
path: /tmp/ssh_keys
state: directory
mode: '0755'
......@@ -24,12 +24,19 @@
ansible_python_interpreter: /usr/bin/python3
- name: Unpack SSH host keys to /etc/ssh
unarchive:
ansible.builtin.unarchive:
src: "/tmp/ssh_keys/{{ SSH_HOST_KEYS_S3_OBJECT }}"
dest: "/etc/ssh"
group: root
owner: root
remote_src: yes
become: true
- name: Remove the temporary folder after put in place
ansible.builtin.file:
path: /tmp/ssh_keys
state: absent
- name: Restart SSH service
ansible.builtin.service:
name: sshd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment