Setting Up Ansible Hosts

0 votes
I'm trying to set my ansible hosts but I want to know the exact steps. Sorry if this a dumb question but I'm a noob at Ansible.
Jan 17 in Ansible by Sameer

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Sammer, follow these steps:

  • Open the host's file

sudo nano /etc/ansible/hosts
  • Add all your hosts inside this file, in this format:
host1 ansible_ssh_host=
host2 ansible_ssh_host=
host3 ansible_ssh_host=

And you're good to go 

answered Jan 17 by Sinha

Related Questions In Ansible

0 votes
1 answer

Configuration for setting up windows VM using ansible and vagrant

Hey @Leena,  your configuration file group_vars/windows-dev should contain something like: ansible_user: ...READ MORE

answered Feb 4 in Ansible by Vaishu
0 votes
1 answer

Ansible: setting profile source in ansible.config

Try and add path in .bashrc or ...READ MORE

answered Jul 10, 2018 in Ansible by ajs3033
• 7,120 points
+1 vote
1 answer

Ansible: Deleting matching IPs from hosts file using regex

Ansible notation isn't the same as YAML ...READ MORE

answered Jul 25, 2018 in Ansible by DareDev
• 6,710 points
0 votes
1 answer

stopping different hosts from reading the same value when usign ansible in loop

Try using this. Create a new directory ...READ MORE

answered Jul 27, 2018 in Ansible by DareDev
• 6,710 points
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

"FATAL: all hosts have already failed -- aborting" - Ansible error

Hey @Anju, you could change your second ...READ MORE

answered Feb 7 in Ansible by Sri
0 votes
1 answer

Reset unreachable hosts - Ansible

If you try using the host that ...READ MORE

answered Feb 7 in Ansible by Yesha

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.