39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
---
|
|
- name: gather os specific variables
|
|
include_vars: "{{ lookup('first_found', possible_files) }}"
|
|
vars:
|
|
possible_files:
|
|
files:
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
|
- "{{ ansible_distribution }}.yaml"
|
|
- "{{ ansible_os_family }}.yaml"
|
|
- "default.yaml"
|
|
paths:
|
|
- vars
|
|
|
|
- name: include os specific tasks
|
|
include_tasks: "{{ lookup('first_found', possible_files) }}"
|
|
vars:
|
|
possible_files:
|
|
files:
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yaml"
|
|
- "{{ ansible_distribution }}.yaml"
|
|
- "{{ ansible_os_family }}.yaml"
|
|
- "default.yaml"
|
|
paths:
|
|
- tasks
|
|
|
|
- name: install
|
|
package:
|
|
name: "{{ rabbitmq_package_name }}"
|
|
state: "{{ rabbitmq_package_state }}"
|
|
|
|
- name: configure
|
|
include: configure.yaml
|
|
|
|
- name: manage service
|
|
service:
|
|
name: "{{ rabbitmq_service_name }}"
|
|
state: "{{ rabbitmq_service_state }}"
|
|
enabled: "{{ rabbitmq_service_enabled }}"
|