webui
webui copied to clipboard
Problem: Cannot override ANSIBLE_HOST_KEY_CHECKING?
Versions
Version 0.0.24.post3
Scope
Ansible (Job Execution)
Issue
Since #60, I'm trying to override the default ANSIBLE_HOST_KEY_CHECKING, as it's set to True by default, but neither EnvironmentFile or Environment in Systemd unit seems to works:
[Service]
#...
EnvironmentFile=/etc/ansibleguy-webui/env.txt
# or
#Environment=ANSIBLE_HOST_KEY_CHECKING=False
#...
grep HOST_KEY /etc/ansibleguy-webui/env.txt
ANSIBLE_HOST_KEY_CHECKING=False
The job is blocking for 1h, then fails:
TASK [Gathering Facts] *********************************************************
The authenticity of host '10.10.10.10 (10.10.10.10)' can't be established.
ED25519 key fingerprint is SHA256:zdG3im0nO9n5+eitxa6sQ7ONMKd5rixs5hPP8Hi0NyA.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?
What's the correct way to change ANSIBLE_HOST_KEY_CHECKING?
Please try to supply the env-variable at https://<host>/ui/system/config
The ansible-runner is actually not inheriting the env-vars from the WebUI service. (as this would also be a security issue)
Maybe the documentation could be improved? Do you have an idea on what to add?
Note: just tested it and it worked
I confirm that too.
So maybe the doc should state that Systemd unit EnvironmentFile is not where to put some (which?) environment variables?