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

fix: add when condition to ssh_host_keys role

Follow the same approach in ssl_cert role, to avoid missing host key issue during deploy
parent e6691e23
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
aws_secret_key: "{{ LTS_SECRET_KEY }}" aws_secret_key: "{{ LTS_SECRET_KEY }}"
vars: vars:
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3
when: SSH_HOST_KEYS_S3_BUCKET | length > 0 and SSH_HOST_KEYS_S3_OBJECT | length > 0
- name: Unpack SSH host keys to /etc/ssh - name: Unpack SSH host keys to /etc/ssh
ansible.builtin.unarchive: ansible.builtin.unarchive:
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
owner: root owner: root
remote_src: yes remote_src: yes
become: true become: true
when: SSH_HOST_KEYS_S3_BUCKET | length > 0 and SSH_HOST_KEYS_S3_OBJECT | length > 0
- name: Remove the temporary folder after put in place - name: Remove the temporary folder after put in place
ansible.builtin.file: ansible.builtin.file:
......
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