Closed pallxk closed 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.
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~/.ssh/config
;Linked Issues
None.