aboutsummaryrefslogblamecommitdiffhomepage
path: root/tasks/debian.yml
blob: 317932ed81981322ee7c277f6232f30b6b27905d (plain) (tree)
1
2
3
4
5
6
7
8




                                                               
              

                             




                                      
              

                             
 




                                                                                   

                             





                                                                                                     
              
                                          


                                           
                             
                  
              

                             
             
                                                                                                                      




                                                         
              






                                                              
              
---
- name: debian | adding RabbitMQ public GPG key to the apt repo
  apt_key:
    url: "{{ rabbitmq_debian_repo_key }}"
    state: present
  become: true
  register: result
  until: result is successful

- name: debian | adding RabbitMQ repo
  apt_repository:
    repo: "{{ rabbitmq_debian_repo }}"
    state: present
  become: true
  register: result
  until: result is successful

- name: debian | add Rabbitmq erlang repo key
  apt_key:
    url: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq-erlang
    state: present
  become: true
  register: result
  until: result is successful
  when: rabbitmq_debian_erlang_from_rabbit

- name: debian | add Rabbitmq erlang repo
  apt_repository:
    repo: deb https://dl.bintray.com/rabbitmq-erlang/debian {{ ansible_distribution_release }} erlang
    state: present
  become: true
  when: rabbitmq_debian_erlang_from_rabbit

- name: debian | installing RabbitMQ server
  apt:
    name: ['rabbitmq-server']
    state: present
  become: true
  register: result
  until: result is successful
  with_items:
    - rabbitmq-server{{ (rabbitmq_debian_version is defined) | ternary(['=',rabbitmq_debian_version] | join(''),'') }}

- name: debian | enabling the RabbitMQ Management Console
  rabbitmq_plugin:
    names: rabbitmq_management
    state: enabled
  become: true
  notify: restart rabbitmq-server

- name: debian | ensuring that the RabbitMQ service is running
  service:
    name: rabbitmq-server
    state: started
    enabled: yes
  become: true