forked from usegalaxy-eu/infrastructure-playbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mq.yml
94 lines (94 loc) · 2.53 KB
/
mq.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
- name: MQ
hosts: mq
become: true
vars:
hostname: mq.galaxyproject.eu
vars_files:
- secret_group_vars/all.yml
- secret_group_vars/pulsar.yml # Pulsar + MQ Connections
collections:
- devsec.hardening
pre_tasks:
- name: Set default version of Python
alternatives:
name: python
path: /usr/bin/python3
- name: Install docker pip package
ansible.builtin.pip:
name: docker
- name: Set docker_users (Docker role)
set_fact:
docker_users: "centos"
- name: Configure SELinux
ansible.posix.seboolean:
name: "{{ item }}"
state: true
persistent: true
loop:
- httpd_can_network_connect
- name: Change the redis_t domain to permissive
community.general.selinux_permissive:
name: redis_t
permissive: true
- name: Disable firewalld service
ansible.builtin.service:
name: firewalld
enabled: true
state: started
- name: Open ports for redis
ansible.posix.firewalld:
port: 6379/tcp
permanent: true
state: enabled
- name: Open ports for rabbitmq
ansible.posix.firewalld:
service: "{{ item }}"
permanent: true
state: enabled
loop:
- amqp
- amqps
- https
- http
- name: Create redis db dir
ansible.builtin.file:
path: /var/lib/redis
owner: redis
group: redis
state: directory
mode: 755
- name: Create redis log dir
ansible.builtin.file:
path: /var/log/redis
owner: redis
group: redis
state: directory
mode: 755
- name: Touches redis
ansible.builtin.file:
path: /var/log/redis/redis-server.log
owner: redis
group: redis
state: touch
mode: 644
roles:
## Starting configuration of the operating system
- role: usegalaxy_eu.handy.os_setup
vars:
enable_hostname: true
enable_powertools: true # geerlingguy.repo-epel role doesn't enable PowerTools repository
enable_remap_user: true
enable_create_user: true
- geerlingguy.repo-epel # Install EPEL repository
- usegalaxy-eu.autoupdates # keep all of our packages up to date
- influxdata.chrony # Keep our time in sync.
# Applications
- geerlingguy.docker
- galaxyproject.nginx
- usegalaxy_eu.rabbitmqserver
- geerlingguy.redis
- dj-wasabi.telegraf
# hardening
- os_hardening
- ssh_hardening