You are on page 1of 2

yum install ansible

cd /etc/ansible
ls
vi ansible.config
vi hostfile
vi hosts
ls
ansible all -m ping
ansible all -m ping --ask-pass
ls -la
cd
ls -la
cd .ssh
ls
cat known_hosts
ansible all -m ping
ansible all -i 192.168.1.16, -m ping
ansible all -i 192.168.1.16, -m ping --ask-pass
ansible all -m ping --ask-pass
cat known_hosts
ssh-key
ssh-keygen
pwd
ls
ssh-copy-id root@192.168.1.15
ansible all -i 192.168.1.15, -m ping --ask-pass
ssh-copy-id root@192.168.1.16
ansible all -m ping
ansible all -m shell -a "free"
ansible all -m shell -a "free-m"
ansible all -m shell -a "free -m"
ansible all -m shell -a "ls"
ansible all -m shell -a "ls -la"
ansible all -m shell -a "systemctl httpd status"
ansible all -m shell -a "systemctl status httpd.service"
ansible all -m shell -a "systemctl start httpd.service"
ansible all -m shell
vi /etc/ansible/hosts
ansible webserver -m ping
ansible appserver -m ping
ansible appserver -m shell -a"ping"
ansible webserver -m shell -a "ping"
ansible webserver -m shell "ping"
ansible appserver -m ping
ansible appserver;webserver -m ping
ansible appserver,webserver -m ping
echo $ANSIBLE_INVENTORY
ls
vi hosts
export ANSIBLE_INVENTORY=~/hosts
ansible all -m ping
vi env
exit
env
cat /usr/bin/env/
cat /usr/bin/env
cat .bash_profile
vi .bash_profile
source .bash_profile
echo $ANSIBLE_INVENTORY
ansible all -m ping
vi /etc/ansible/ansible.cfg

You might also like