Is --user meant to override the remote_user in the playbook? Because it doesn't seem to

98 views
Skip to first unread message

Josh Grigonis

unread,
Apr 14, 2016, 10:09:04 AM4/14/16
to Ansible Project
If this is the start of my playbook:

---
- hosts: all
  remote_user
: root

And then I run this command line:

ansible-playbook foo.yml -u ec2-user -vvvv

I still see this in the output:
   
 -o User=root

I would expect the command line to take precedence.

Brian Coca

unread,
Apr 14, 2016, 10:15:31 AM4/14/16
to ansible...@googlegroups.com
no, the command line option overrides the built in default and/or ansible.cfg, the remote_user in the play or ansible_user/ansible_ssh_user in inventory are considered 'more specific' and override this command line setting.


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages