Sei sulla pagina 1di 1

##To Install Ansible

8:46 PM: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.no


arch.rpm
it is mainly for pythan package.
yum install *epel*

yum install ansible


## genate a Keypair
ssh-keygen
#copy the private key of the keypair which you have created before
cat /root/.ssh/id_rsa.pub
*********************************************************************
login other vms
cd .ssh
vi authorized_key
##to go last line in authorized_key file
click on "o"
Paste private key on last line
get IP address
***********************************************************************
###try ssh from ansible installed vm
###connection will get established
ssh 172.31.36.199
http://docs.ansible.com/ansible/intro_getting_started.html
## Enter clients to login remote
vi /etc/ansible/hosts
shift+g
#to run hostname command on other vm which you have updated in hosts file ip.
ansible all -a "hostname"
ansible all -a "touch /tmp/test"

Potrebbero piacerti anche