1 Star 0 Fork 48

oscar0922/ansible

forked from linuxsamu/ansible 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
debug1.yml 376 Bytes
一键复制 编辑 原始数据 按行查看 历史
linuxsamu 提交于 2020-12-29 03:05 . 增加集群,修复bug
- hosts: rabbitmq
remote_user: root
tasks:
- name: populate inventory into hosts file
blockinfile:
path: /etc/hosts
block: |-
{% for item in (groups['rabbitmq'])|unique -%}
{{ item }} {{ hostvars[item]['name'] }}
{% endfor %}
state: present
create: yes
backup: yes
unsafe_writes: yes
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/oscargit/ansible.git
git@gitee.com:oscargit/ansible.git
oscargit
ansible
ansible
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385