Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



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

Answer / Kumar Sourav

To handle situations where different machines require different user accounts and/or ports for logging in using Ansible, you can create specific inventory entries for each machine and override the default settings:n1. Define custom inventory entries: In your inventory file, define separate entries for each machine with their respective user account and port.nExample:nhost1:n ansible_user: myusernamen ansible_port: 2222nhost2:n ansible_user: anotherusernamen ansible_port: 3333nn2. Use the custom inventory entries in your playbook: When running tasks, Ansible will use the specified user account and port for each machine.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ansible Interview Questions

How to create encrypted files using ansible?

1 Answers  


What are ansible vaults?

1 Answers  


Enlist the differences between variable name and environment variables.

1 Answers  


How do I handle python pathing not having a python 2.x in /usr/bin/python on a remote machine?

1 Answers  


When should I use {{ }}?

1 Answers  


Explain different modules in ansible.

1 Answers  


How can one interpolate variables or dynamic variable names?

1 Answers  


Desired to gain proficiency on ansible?

1 Answers  


What features does the ansible tower provide?

1 Answers  


How do I copy files recursively onto a target host?

0 Answers  


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

1 Answers  


How to keep secret data in a playbook?

1 Answers  


Categories