k3s-io / k3s-ansible

Apache License 2.0
1.89k stars 780 forks source link

Allow empty `ansible_user` #277

Closed pallxk closed 6 months ago

pallxk commented 6 months ago

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

Linked Issues

None.

dereknola commented 6 months ago

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.