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

Allow empty ansible_user #277

Closed
wants to merge 1 commit into from

Conversation

pallxk
Copy link
Contributor

@pallxk pallxk commented Dec 12, 2023

Changes

Allow ansible_user to be specified as an empty string.

ansible_user specifies the username to use when connecting to hosts, but it should not be required to have a value in my opinion as the same info may also

  • be provided in ~/.ssh/config;
  • be omitted if it happens to be the same username on both local and remote;
  • be unnecessary if using local connection.

Linked Issues

None.

Signed-off-by: Xiangkun Liu <[email protected]>
@dereknola
Copy link
Member

This seems like an unnecessary complication. To support a local configuration, you would already need to modify the playbook/site.yml to have connection: local to support a localhost host value. At that point, why not just modify your inventory to also include the ansible_user: MY_LOCAL_USER. This change doesn't really help with a better "default case" as further modification to code is still required.

@dereknola dereknola closed this Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants