摘要: 1. 定义组机和组 inventory文件可以是许多格式之一,具体取决于您拥有的inventory插件。 对于这个例子, /etc/ansible/hosts的格式是一个INI(类似于Ansible的默认设置) 2. 主机变量 如上所述,很容易将变量分配给稍后将在playbook中使用的主机: 3. 阅读全文
posted @ 2018-06-14 15:36 你的泪我的眼 阅读(1110) 评论(0) 推荐(0) 编辑
摘要: 参考: https://www.cnblogs.com/ilurker/p/6421624.html 1. 使用自定义的hosts 格式: ansible 组机匹配 -i 自定义的hosts -m modulename -a "一些参数" ansible ios_cn:ios_tw -i ./hos 阅读全文
posted @ 2018-06-14 14:27 你的泪我的眼 阅读(381) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/u012938881/article/details/51755105 https://www.cnblogs.com/chengtch/p/6067915.html 阅读全文
posted @ 2018-06-14 10:53 你的泪我的眼 阅读(125) 评论(0) 推荐(0) 编辑