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




                                                               
              




                                      
              
 










                                                                                                     
              
                                          




                                           
              
             
                                                                                                                     




                                                         
              






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

- name: debian | adding RabbitMQ repo
  apt_repository:
    repo: "{{ rabbitmq_debian_repo }}"
    state: present
  become: true

- name: debian | add Rabbitmq erlang repo key
  apt_key:
    url: https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq-erlang
    state: present
  become: true
  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: "{{ item }}"
    state: present
  become: true
  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