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, 2019 in Ansible by Sameer
651 views

1 answer to this question.

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:
[servers]
host1 ansible_ssh_host=203.0.113.1
host2 ansible_ssh_host=203.0.113.2
host3 ansible_ssh_host=203.0.113.3

And you're good to go 

answered Jan 17, 2019 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, 2019 in Ansible by Vaishu
753 views
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,300 points
6,519 views
+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,890 points
2,324 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,038 views
+2 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, 2019 in Ansible by Sri
1,370 views
0 votes
1 answer

Reset unreachable hosts - Ansible

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

answered Feb 7, 2019 in Ansible by Yesha
2,149 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP