Ansible/roles/sensu.sensu/tasks/Ubuntu/rabbit.yml

54 lines
1.2 KiB
YAML
Raw Normal View History

---
# tasks/Ubuntu/rabbit.yml: Deploy RabbitMQ
# Specific to Ubuntu
- name: Include ansible_distribution vars
include_vars:
file: "{{ ansible_distribution }}.yml"
tags: rabbitmq
- name: Ensure the RabbitMQ APT repo GPG key is present
tags: rabbitmq
apt_key:
url: "{{ sensu_rabbitmq_signing_key }}"
state: present
- name: Ensure the RabbitMQ APT repo is present
tags: rabbitmq
apt_repository:
repo: "{{ sensu_rabbitmq_repo }}"
filename: rabbitmq
state: present
update_cache: true
- name: Ensure Erlang APT preferences is configured
tags: rabbitmq
template:
src: erlang-apt-preferences.j2
dest: /etc/apt/preferences.d/erlang
owner: root
group: root
mode: 0755
- name: Ensure the Erlang APT repo GPG key is present
tags: rabbitmq
apt_key:
url: "{{ sensu_rabbitmq_erlang_signing_key }}"
state: present
- name: Ensure the Erlang APT repo is present
tags: rabbitmq
apt_repository:
repo: "{{ sensu_rabbitmq_erlang_repo }}"
filename: erlang
state: present
update_cache: true
- name: Ensure RabbitMQ is installed
tags: rabbitmq
apt:
name: rabbitmq-server
state: "{{ sensu_rabbitmq_pkg_state }}"
cache_valid_time: 600
update_cache: true