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







                                



                                                               
              

                             




                                      
              

                             
 




                                                                                   

                             





                                                                                                     
              
                                          


                                           

                                                                                                                        
                  
              

                             




                                                         
              






                                                              
              
---
- name: debian | Adding Pre-Reqs
  apt:
    name: ['gnupg2']
    state: present
  become: true
  register: result
  until: result is successful

- 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{{ (rabbitmq_debian_version is defined) | ternary(['=',rabbitmq_debian_version] | join(''),'') }}
    state: present
  become: true
  register: result
  until: result is successful

- 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