Skip to content

Commit fb38869

Browse files
committed
fix: disable known_hosts by global config
1 parent e85854e commit fb38869

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

deployment/docker/runner/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ RUN apk add --no-cache -U python3-dev build-base openssl-dev libffi-dev cargo &&
8181
find ${ANSIBLE_VENV_PATH} -iname __pycache__ | xargs rm -rf && \
8282
chown -R semaphore:0 /opt/semaphore
8383

84+
RUN echo 'Host *\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null' > /etc/ssh/ssh_config.d/semaphore.conf
85+
8486
USER 1001
8587

8688
ENV VIRTUAL_ENV="$ANSIBLE_VENV_PATH"

deployment/docker/server/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ RUN apk add --no-cache -U \
5959
chown -R semaphore:0 /opt/semaphore && \
6060
find /usr/lib/python* -iname __pycache__ | xargs rm -rf
6161

62+
RUN echo 'Host *\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null' > /etc/ssh/ssh_config.d/semaphore.conf
63+
6264
COPY --chown=1001:0 ./deployment/docker/server/ansible.cfg /etc/ansible/ansible.cfg
6365
COPY --from=builder /go/src/semaphore/deployment/docker/server/server-wrapper /usr/local/bin/
6466
COPY --from=builder /go/src/semaphore/bin/semaphore /usr/local/bin/

deployment/docker/server/ansible.cfg

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
[defaults]
22
host_key_checking = False
33
bin_ansible_callbacks = True
4-
stdout_callback = yaml
5-
6-
[ssh_connection]
7-
ssh_args = -o UserKnownHostsFile=/dev/null
4+
stdout_callback = yaml

0 commit comments

Comments
 (0)