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

common: Specify ansible_user var for local playbook run #5955

Closed
wants to merge 1 commit into from

Conversation

szczepax
Copy link
Contributor

@szczepax szczepax commented Dec 18, 2023

Ansible_user is undefined on Localhost with local connection and needs to be always passed with --extra-vars
https://radeksprta.eu/posts/ansible_user-is-undefined-on-localhost/


This change is Reviewable

@osalyk osalyk added sprint goal This pull request is part of the ongoing sprint no changelog Add to skip the changelog check on your pull request labels Dec 19, 2023
Copy link
Contributor

@osalyk osalyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @szczepax)

Copy link
Contributor

@janekmi janekmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @szczepax)


utils/ansible/README.md line 116 at r1 (raw file):

For localhost execution with a local connection you should always pass `ansible_user=pmdkuser` as a variable due to
[ansible_user Is Undefined on Localhost](https://radeksprta.eu/posts/ansible_user-is-undefined-on-localhost/).

Learned the hard way. But knowing that it is just how it works no mystery remains. If you would like to link something I prefer to link the official documentation. Even though it is not easy to read.

My suggestion is below. No links. Rather an explanation of what is the deal.

Suggestion:

It is possible to run playbooks directly on the target platform. In this case, you have to always pass `ansible_user=pmdkuser` as an additional variable since the playbooks are fine-tuned for remote execution and assume the `ansible_user` variable is defined. When running on a remote target the connection plugin does it for you.

utils/ansible/README.md line 144 at r1 (raw file):

Example - GitHub self-hosted runner setup

No additional variables below this point. This variable is local-specific whereas the example is generic.

Copy link
Contributor Author

@szczepax szczepax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @janekmi)


utils/ansible/README.md line 116 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…

Learned the hard way. But knowing that it is just how it works no mystery remains. If you would like to link something I prefer to link the official documentation. Even though it is not easy to read.

My suggestion is below. No links. Rather an explanation of what is the deal.

Done.


utils/ansible/README.md line 144 at r1 (raw file):

Previously, janekmi (Jan Michalski) wrote…

No additional variables below this point. This variable is local-specific whereas the example is generic.

ansible_user=pmdkuser is needed by "Create new namespace configuration" step

@janekmi janekmi removed the sprint goal This pull request is part of the ongoing sprint label Jan 29, 2024
@grom72
Copy link
Contributor

grom72 commented Mar 14, 2024

Continue on #6055

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Add to skip the changelog check on your pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants