Ansible/roles/sensu.sensu/tasks/Amazon/main.yml

31 lines
767 B
YAML
Raw Normal View History

---
# tasks/Amazon/main.yml: CentOS specific set-up
# This takes care of base prerequisites for Amazon Linux AMI
- name: Include ansible_distribution vars
tags: setup
include_vars:
file: "{{ ansible_distribution }}.yml"
- name: Set epel_version override when AmazonLinux AMIv2
tags: setup
set_fact:
epel_version: 7
when: ansible_distribution_version == 'Candidate'
- name: Ensure the Sensu Core Yum repo is present
tags: setup
yum_repository:
name: sensu
description: The Sensu Core yum repository
baseurl: "{{ sensu_yum_repo_url }}"
gpgkey: "{{ sensu_yum_key_url }}"
gpgcheck: yes
enabled: yes
- name: Ensure Sensu is installed
tags: setup
yum:
name: "{{ sensu_package }}"
state: "{{ sensu_pkg_state }}"