Patterns:
主题
在Ansible中,Patterns 是指我们怎样确定由哪一台主机来关机,意思就是与哪台主机进行交互,
ansible webservers -m service -a "name=httpd state=restarted
一个pattern 通常关联到一系列组(主机的集合)--如上示例中,所有的主机均在“webservers” 组中.
不管怎么样,在使用Ansible前,我们需要事先告诉Ansible哪台机器将被执行,能这样做的前提是需要预先
定义唯一的host names或者主机组
[root@node01 ~]# ansible webservers -m service -a "name=httpd state=restarted"
192.168.137.3 | SUCCESS => {
"changed": true,
"failed": false,
"name": "httpd",
"state": "started"
}
[root@node01 ~]# ansible webservers -m service -a "name=httpd state=stopped"
192.168.137.3 | SUCCESS => {
"changed": true,
"failed": false,
"name": "httpd",
"state": "stopped"
}
[root@node01 ~]# ansible webservers -m service -a "name=httpd state=started"
192.168.137.3 | SUCCESS => {
"changed": true,
"failed": false,
"name": "httpd",
"state": "started"
}
patterns
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
[xmind] Think in Patterns
Think in Patterns 笔记
设计模式 Think in Patterns -
Enterprise Integration Patterns
tion Patterns from the excellent book of the same name by Gregor Hohpe and Bobby Woolf. Its a highly recommended book,
exchange activemq spring processing bean -
Dominating Patterns
题目链接:http://vjudge.net/problem/36265
i++ 后缀 c++ 数组 结点