Move remote_user to ansible.cfg
Command line options override config files like ansible.cfg, but not inventory data or playbook directives. This allows us to over- ride remote_user with `-u` on the command line to log in as root before we have set up the provisioning user. See: https://github.com/ansible/ansible/issues/7841#issuecomment-245716271
This commit is contained in:
parent
5010e56223
commit
cb5fe90499
@ -4,6 +4,7 @@ force_handlers=True
|
||||
inventory=hosts
|
||||
# instead of using --ask-vault-pass
|
||||
ask_vault_pass=True
|
||||
remote_user = provisioning
|
||||
|
||||
ansible_managed = This file is managed by Ansible.%n
|
||||
template: {file}
|
||||
|
1
web.yml
1
web.yml
@ -3,7 +3,6 @@
|
||||
|
||||
- name: Configure web servers
|
||||
hosts: web
|
||||
remote_user: provisioning
|
||||
become: yes
|
||||
roles:
|
||||
- common
|
||||
|
Loading…
x
Reference in New Issue
Block a user