Benjamin Francis
3 min readNov 30, 2020

Arth task 11.1

Configure Hadoop and start cluster services using Ansible Playbook

STEPS FOR CONFIGURING ANSIBLE IN CONTROL NODE -

STEP 1>>Download ANSIBLE

pip3 install ansible

STEP 2>>To create inventory

To create inventory we have to create a file

vim <filename>.txt [eg.,vim ip.txt or vim /root/ip.txt]

And we have to write these details

<ip> ansible_user=<user name> ansible_ssh_pass=<password> ansible_connection=ssh

For this task we have manage two target node one namenode and one datenode

Now the ansible version by typing

ansible — -version

and go to ansible /etc/ansible/ansible.conf

To check

it show ip of target node if its connected

Ping to the host to see there is ssh connectivity

Now its ready to run the ansible Playbook

For this task we have to create 2 playbooks one for namenode and other for datanode:

  1. create a directory: cmd: mkdir /<name> [eg., mkdir /task]
  2. cd /ws ->create 2 file : vim <file name>.yml

Playbook of namenode

Playbook of datanode file

Now run the playbook for namenode(NN.yml)

Now run the playbook for datanode(DD.yml)

Goto namenode to verify

Now goto datanode to check

task 11.1 succesfully completed

No responses yet