8 Star 59 Fork 46

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
Shell
1
https://gitee.com/linuxsamu/ansible.git
git@gitee.com:linuxsamu/ansible.git
linuxsamu
ansible
ansible
master

搜索帮助