1.ansible的安装yum-yinstallansible2.然后就是配置/etc/ansible/hosts,里面主要记载着你登录的ip或者别名以及登录时的用户以及密码,根据需求我这里把所有主机分为2类,[web]和[orther]#cp/etc/ansible/hosts/etc/ansible/hosts-#操作前备份#viweb#创建web文件,记载主机ip以..
分类:
其他好文 时间:
2015-08-07 20:23:39
阅读次数:
286
The Tower of Babylon
Time Limit: 3000MS
Memory Limit: Unknown
64bit IO Format: %lld & %llu
Submit Status
Description
Perhaps you have heard of the legend of the...
分类:
其他好文 时间:
2015-08-07 14:52:28
阅读次数:
155
Missile
Time Limit: 2 Seconds
Memory Limit: 65536 KB
You control N missile launching towers. Every tower has enough missiles, but for each tower only one missile can be launch at the s...
分类:
其他好文 时间:
2015-08-07 11:15:20
阅读次数:
102
在使用ansible做自动化运维的时候,免不了的要重复执行某些操作,如:添加几个用户,创建几个MySQL用户并为之赋予权限,操作某个目录下所有文件等等。好在playbooks支持循环语句,可以使得某些需求很容易而且很规范的实现。with_items是playbooks中最基本也是最常用的循环语句..
分类:
其他好文 时间:
2015-08-05 22:34:02
阅读次数:
1869
一、安装
$ pip install ansible
#for debian
$ sudo apt-add-repository ppa:rquillo/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
#for centos
$ sudo yum install ansible
二、环境说明
1....
分类:
其他好文 时间:
2015-08-04 17:25:44
阅读次数:
194
在平时运维工作中有时候需要根据不同的远程节点或者针对不同的IP的系统做不同的配置部署.如,Ansible可以根据不同的IP地址来对各个节点上的配置文件做不同的处理,这里就需要用到变量。可以在playbooks文件中直接定义变量:-hosts:webservers
vars:
http_port:80定义了一个变量..
分类:
其他好文 时间:
2015-08-01 06:33:14
阅读次数:
191
当需要对多个远程节点,做很多操作的时候,如果将所有的内容都书写到一个playbooks中,这就会产生一个很大的文件,而且里面的某些内容也很难复用。此时不得不考虑怎么样分隔及组织相关的文件。最基本的,可以将任务列表单独分隔到一个小文件里,然后在tasks中包含该文件即可。..
分类:
其他好文 时间:
2015-07-30 15:08:55
阅读次数:
871
记得自己当初最早使用Ansible的时候,网上搜到的中文资料的都是零零散散的,后来只能硬着头皮看官方的英文文档。发现好多事情都没有什么捷径可走,最好的资料还是官方的文档。最近又抽时间按照官方文档对Ansible做了一个较为系统的学习与研究,主要是为了整理一份较为完善的学..
分类:
其他好文 时间:
2015-07-30 02:14:45
阅读次数:
1675
Perhaps you all have heard the mythical story about Tower of Hanoi (The details of this story is not required to solve this problem): “There is a towe...
分类:
其他好文 时间:
2015-07-26 20:29:47
阅读次数:
105
前段时间去了解ansible配置管理(http://blog.csdn.net/column/details/ansible.html anisble配置工具盒翻译),我感觉很强烈,认为短期内tornado和twisted它是做什么的组合webUI今天动手做了一个demo,眼下大概实现的功能是:加....
分类:
数据库 时间:
2015-07-26 15:32:38
阅读次数:
282