-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.yml
53 lines (52 loc) · 1.48 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
- name: RabbitMQServer
hosts: rabbitmq
become: true
become_user: root
vars_files:
- secret_group_vars/rabbitmq.yml
pre_tasks:
- name: Only run "update_cache=yes" if the last one is more than 3600 seconds ago
apt:
update_cache: true
cache_valid_time: 3600
when: ansible_os_family == 'Debian'
- name: Install dependencies
ansible.builtin.package:
state: latest
name:
- python3-pip
- python3-virtualenv
- name: Configure SELinux
ansible.posix.seboolean:
name: "{{ item }}"
state: true
persistent: true
loop:
- httpd_can_network_connect
when: ansible_os_family == 'CentOS'
- name: Install docker pip package
ansible.builtin.pip:
name: docker
- name: Set docker user
block:
- name: Set _docker_users CentOS
set_fact:
_docker_users: ['centos']
when: ansible_distribution == 'CentOS'
- name: Set _docker_users Ubuntu
set_fact:
_docker_users: ['ubuntu']
when: ansible_distribution == 'Ubuntu'
- name: Set _docker_users Debian
set_fact:
_docker_users: ['debian']
when: ansible_distribution == 'Debian'
- name: Set docker_users
set_fact:
docker_users: "{{ _docker_users }}"
roles:
- create_rabbitmq_user
- geerlingguy.docker
- galaxyproject.nginx
- usegalaxy_eu.rabbitmqserver