How do I handle different machines needing different user accounts or ports to log in with?

0 votes

How do I handle different machines needing different user accounts or ports to log in with?

Jan 30 in Ansible by Naina
24 views

1 answer to this question.

0 votes

Setting inventory variables in the inventory file is the easiest way.

For instance, suppose these hosts have different usernames and ports:

[webservers]
asdf.example.com  ansible_port=5000   ansible_user=alice
jkl.example.com   ansible_port=5001   ansible_user=bob

You can also dictate the connection type to be used, if you want:

[testcluster]
localhost           ansible_connection=local
/path/to/chroot1    ansible_connection=chroot
foo.example.com     ansible_connection=paramiko
answered Jan 30 by Ansi

Related Questions In Ansible

0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,890 points
777 views
0 votes
1 answer
0 votes
1 answer

How do I access environment variables in Ansible?

Yes @Nagray, you're right! You can access ...READ MORE

answered Jan 24 in Ansible by Tessie
799 views
0 votes
1 answer

How do I configure a jump host to access servers that I have no direct access to?

You can set a ProxyCommand in the ansible_ssh_common_args inventory variable. Any ...READ MORE

answered Jan 30 in Ansible by Mahir
200 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
152 views
0 votes
1 answer
0 votes
1 answer