exam 13
Perform the following tasks:
- Install ansible using the package manager if not installed.
- Generate your ssh key to path
~/.ssh/id_rsa
- Push the public key: (
~/.ssh/id_rsa.pub
) on the remote servers listed in:~/playbooks/inventory
- Test your setup is working with:
ansible all -m ping -i /home/thor/playbooks/inventory
Use password: Passw0rd
to ssh onto the remote hosts. Remember the remote hosts are managed by the root
user.
Generate your ssh key
ssh-keygen -t rsa
Updated the inventory as per below given code
node00 ansible_host=172.20.1.100 ansible_user=root ansible_ssh_pass=Passw0rd
node01 ansible_host=172.20.1.101 ansible_user=root ansible_ssh_pass=Passw0rd
Comments
Post a Comment