Skip to content

Commit

Permalink
ansible模块
Browse files Browse the repository at this point in the history
  • Loading branch information
ppabc committed Jun 6, 2016
1 parent 1243fc0 commit 7c50afb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ansible/ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ vi /etc/ansible/hosts
ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]
ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]

##ansible使用及基本语法ping
##ansible使用ping模块
ansible all -m ping
ansible webservers -m ping

Expand Down Expand Up @@ -117,11 +117,11 @@ ansible 10.1.1.113 -m synchronize -a 'src=/root/a dest=/tmp/ compress=yes'
##将10.1.1.113节点的/tmp/a目录拉取到主控节点的/root目录下
ansible 10.1.1.113 -m synchronize -a 'mode=pull src=/tmp/a dest=/root/'

##facts侦测模块
ansible webservers -m setup -a "filter=ansible_eth[0-2]"





##Git模块
ansible webservers -m git -a "repo=https://xxx.com/tomcat.git dest=/data"



0 comments on commit 7c50afb

Please sign in to comment.