Syntax
# Command hostgroups module/arguements[options]
Examples
#ansible webserver reboot
#ansible all -a uptime
#ansible all -a "uname -a"
#ansible all -m
# ansible-doc -l |more
#ansible-doc -l |more |wc -l
#ansible-doc -l | grep -i <modulename>
#ansible-doc <modulename>
#ansible-doc -s <modulename>
example
#ansible all -m ping
#ansible all -m ping -o
#ansible all -m user -a "name=john password=redhat"
#rpm -q httpd
#ansible all -a "yum -y install httpd"
rpm -q httpd
#ansible all -a "yum -y remove httpd"
#ansible all -m yum -a "name=httpd state=present"
#ansible all -m yum -a "name=httpd state=absent"
#ansible all -m shell -a "uname -a;df -h" -v
No comments:
Post a Comment