




GET 瀏覽網(wǎng)頁的過程是GET方法
POST將客戶端數(shù)據(jù)提交到服務器,例:注冊用戶
HEAD 看網(wǎng)頁首部
DELETE
HTTP狀態(tài)碼










上節(jié)內(nèi)容回顧加實踐
41是管理機:
41----->61
41----->31
1)在41上配置ansible
#!/bin/bash
yum install ansible -y
ssh-keygen -f ~/.ssh/id_rsa? -P '' -q
for ip in 31 61
do
? sshpass -p123456 ssh-copy-id -f -i ~/.ssh/id_rsa.pub "-o StrictHostKeyChecking=no" 172.16.1.$ip
done
#test
ssh 172.16.1.61 "ifconfig eth0"
ssh 172.16.1.31 "ifconfig eth0"
2)ansible基本配置
[root@backup ~]# cat /etc/ansible/hosts
[oldboy]
172.16.1.31
172.16.1.61
vim /etc/ansible/ansible.cfg +374
結尾增加: -o StrictHostKeyChecking=no
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s? -o StrictHostKeyChecking=no
3)使用ansible
[root@backup ~]# ansible oldboy -m command -a "free -m"
172.16.1.31 | CHANGED | rc=0 >>
? ? ? ? ? ? ? total? ? ? ? used? ? ? ? free? ? ? shared? buff/cache? available
Mem:? ? ? ? ? ? 972? ? ? ? ? 79? ? ? ? 791? ? ? ? ? 7? ? ? ? 101? ? ? ? 757
Swap:? ? ? ? ? 767? ? ? ? ? 0? ? ? ? 767
172.16.1.61 | CHANGED | rc=0 >>
? ? ? ? ? ? ? total? ? ? ? used? ? ? ? free? ? ? shared? buff/cache? available
Mem:? ? ? ? ? ? 972? ? ? ? ? 66? ? ? ? 768? ? ? ? ? 7? ? ? ? 137? ? ? ? 754
Swap:? ? ? ? ? 767? ? ? ? ? 0? ? ? ? 767
4)查看使用幫助
ansible-doc -l? ? #模塊就Linux命令了。
command? ? Executes a command on a remote node
查模塊的參數(shù):
ansible-doc -s command? #Linux命令參數(shù)