aboutsummaryrefslogtreecommitdiffhomepage
path: root/Vagrant/roles/ansible-rabbitmq/playbook.yml
blob: 498c829b18efa3ede6a82132ca771f459967444a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
- hosts: all
  become: true
  vars:
    - pri_domain_name: 'test.vagrant.local'
  roles:
  tasks:
    - name: updating /etc/hosts
      lineinfile:
        dest: /etc/hosts
        regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
        line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
        state: present
      with_items: groups['all']
      
- hosts: all
  become: true
  vars:
    - rabbitmq_config_ha: true
    - rabbitmq_enable_clustering: true
    - pri_domain_name: 'test.vagrant.local'
    - rabbitmq_master: 'node0'
  roles:
    - role: ansible-rabbitmq
  tasks: