06 2016 档案

摘要:Add a new shell script configure_slave.sh as following: Touch a Dockerfile as following: docker build -t jenkins_slave . 阅读全文
posted @ 2016-06-28 14:53 mxking 阅读(233) 评论(0) 推荐(0) 编辑
摘要:模块是一个独立的, 可以复用的脚本, 它可以被anisible API, Ansible 或者ansible-playbook使用. 在模块退出之前, 它通过输出一个json字符串到标准输出从而反馈信息给ansible. 你可以用任何一种语言去写一个模块. 写好的模块可以放在ANSIBLE_LIBR 阅读全文
posted @ 2016-06-20 16:23 mxking 阅读(4909) 评论(0) 推荐(0) 编辑
摘要:没啥好说的. 自己看吧 http://docs.ansible.com/ansible/playbooks_filters.html 阅读全文
posted @ 2016-06-20 09:25 mxking 阅读(746) 评论(0) 推荐(0) 编辑
摘要:1. 文件内容的读取 2. passwd的查询 3. cvs文件查询 4. INI文件查询 5. Credstash查询 6. DNS查询 另外: ansible还支持环境变量, ectd, pipe等查询 阅读全文
posted @ 2016-06-20 08:50 mxking 阅读(1471) 评论(0) 推荐(0) 编辑
摘要:1. 变量来源 inventoryfile中定义 playbook中定义 include文件和角色中定义变量 系统facts ansible hostname -m setup local facts 2. 变量的使用 {{ ansible_eth0["ipv4"]["address"] }} 或者 阅读全文
posted @ 2016-06-17 17:03 mxking 阅读(14524) 评论(1) 推荐(0) 编辑
摘要:标准循环 嵌套循环 字典循环(with_dict) 文件循环(with_file, with_fileglob) with_file 是将每个文件的文件内容作为item的值 with_fileglob 是将每个文件的全路径作为item的值, 在文件目录下是非递归的, 如果是在role里面应用改循环, 阅读全文
posted @ 2016-06-17 10:45 mxking 阅读(28094) 评论(0) 推荐(2) 编辑
摘要:Strategies 控制task的执行方式, 在2.0中增加了"free" Strategies, 可以允许每个host尽快的执行完一个play. 默认是Strategies是linear, 表示任何host必须等待所有的host完成一个task后才能开始执行下一个task Strategies 阅读全文
posted @ 2016-06-17 08:48 mxking 阅读(776) 评论(0) 推荐(0) 编辑