A better description is "How to set remote_user for according to OS 
distribution

On Friday, July 10, 2015 at 4:07:14 PM UTC-5, Adam R. wrote:
>
> 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!
>
>
>
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/12e6adcc-59be-42c8-ba78-c63bb8927efc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to