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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are ansible server requirements?

4


List some advantages of using ansible.

3


What are the different components of ansible?

3


Explain the callback plugin in ansible?

3


Where does the configuration file live and what can I configure in it?

4


What is ansible galaxy?

3


What is configuration management and how does it help an organization?

3


Is ansible an open source tool?

3


How would you install ansible on a centos system?

3


How to keep secret data in a playbook?

3


Suppose you’re using ansible to configure the production environment and your playbook uses an encrypted file. Encrypted files prompt the user to enter passwords. But since ansible is used for automation, can this process be automated?

3


Explain what are playbooks in ansible? Explain with some examples.

3


How do I write an ansible handler with multiple tasks?

3


How do I submit a change to the documentation?

3


Is there a web interface / rest api / etc?

3