Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Cannot override ANSIBLE_HOST_KEY_CHECKING? #78

Open
mathieumd opened this issue Oct 7, 2024 · 3 comments
Open

Problem: Cannot override ANSIBLE_HOST_KEY_CHECKING? #78

mathieumd opened this issue Oct 7, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation problem Problem

Comments

@mathieumd
Copy link

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?

@mathieumd mathieumd added problem Problem triage Triage labels Oct 7, 2024
@ansibleguy
Copy link
Owner

ansibleguy commented Oct 7, 2024

Please try to supply the env-variable at https://<host>/ui/system/config
image

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?

@ansibleguy ansibleguy added documentation Improvements or additions to documentation and removed triage Triage labels Oct 7, 2024
@ansibleguy
Copy link
Owner

Note: just tested it and it worked

@mathieumd
Copy link
Author

I confirm that too.

So maybe the doc should state that Systemd unit EnvironmentFile is not where to put some (which?) environment variables?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation problem Problem
Projects
None yet
Development

No branches or pull requests

2 participants