Adam R.
2015-07-10 21:07:14 UTC
Hello,
I am creating a role to upgrade my servers. Some are CentOS others are
Fedora. CentOS servers use remote_user: root and Fedora servers
remote_user: fedora
How can i setup my playbook to use one remote_user according to
ansible_distribution?
In the Ansible FAQ there is a section that deals with these issue setting
inventory variables in the inventory file, but i am
using dynamic inventory.
http://docs.ansible.com/faq.html#how-do-i-handle-different-machines-needing-different-user-accounts-or-ports-to-log-in-with
Or there is a way to try sshing as some user if the connection fails, try
another login user?
How to choose remote user according to OS?
Or it is easier to create a separate playbook for each ansible_distribution?
Thank you!
I am creating a role to upgrade my servers. Some are CentOS others are
Fedora. CentOS servers use remote_user: root and Fedora servers
remote_user: fedora
How can i setup my playbook to use one remote_user according to
ansible_distribution?
In the Ansible FAQ there is a section that deals with these issue setting
inventory variables in the inventory file, but i am
using dynamic inventory.
http://docs.ansible.com/faq.html#how-do-i-handle-different-machines-needing-different-user-accounts-or-ports-to-log-in-with
Or there is a way to try sshing as some user if the connection fails, try
another login user?
How to choose remote user according to OS?
Or it is easier to create a separate playbook for each ansible_distribution?
Thank you!
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1c9c2e61-1a3b-4ec4-b03b-346183cb8806%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1c9c2e61-1a3b-4ec4-b03b-346183cb8806%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.