Add Centos-8 support

Depends-On: https://review.opendev.org/734672
Depends-On: https://review.opendev.org/735289
Change-Id: I35690f9a54337d6a268406ddcf6726f7040ac966
This commit is contained in:
Dmitriy Rabotyagov 2020-06-15 13:21:12 +03:00 committed by Dmitriy Rabotyagov (noonedeadpunk)
parent 52953f08c5
commit fc27e735a6
5 changed files with 27 additions and 6 deletions

View File

@ -26,6 +26,9 @@ rabbitmq_host_group: "rabbitmq_all"
# The local address used for the rabbitmq cluster node # The local address used for the rabbitmq cluster node
rabbitmq_node_address: "{{ ansible_host }}" rabbitmq_node_address: "{{ ansible_host }}"
rabbit_system_user_name: rabbitmq
rabbit_system_group_name: rabbitmq
# Hosts file entries (set this to an empty list to disable /etc/hosts generation # Hosts file entries (set this to an empty list to disable /etc/hosts generation
# for the rabbitmq cluster nodes) # for the rabbitmq cluster nodes)
rabbitmq_hosts_entries: >- rabbitmq_hosts_entries: >-

View File

@ -28,6 +28,8 @@
template: template:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
owner: "{{ rabbit_system_user_name }}"
group: "{{ rabbit_system_group_name }}"
with_items: with_items:
- { src: "rabbitmq.config.j2", dest: "/etc/rabbitmq/rabbitmq.config" } - { src: "rabbitmq.config.j2", dest: "/etc/rabbitmq/rabbitmq.config" }
- { src: "rabbitmq-server.j2", dest: "/etc/default/rabbitmq-server" } - { src: "rabbitmq-server.j2", dest: "/etc/default/rabbitmq-server" }

View File

@ -48,12 +48,28 @@
tags: tags:
- rabbitmq-config - rabbitmq-config
- name: Create the system group
group:
name: "{{ rabbit_system_group_name }}"
state: "present"
system: "yes"
- name: Create the rabbit system user
user:
name: "{{ rabbit_system_user_name }}"
group: "{{ rabbit_system_group_name }}"
comment: "RabbitMQ messaging server"
shell: "/bin/false"
system: "yes"
createhome: "yes"
home: "/var/lib/rabbitmq"
- name: Create the local directories - name: Create the local directories
file: file:
path: "/etc/rabbitmq/" path: "/etc/rabbitmq/"
state: "directory" state: "directory"
group: "root" group: "{{ rabbit_system_user_name }}"
owner: "root" owner: "{{ rabbit_system_group_name }}"
mode: "0755" mode: "0755"
tags: tags:
- rabbitmq-config - rabbitmq-config

View File

@ -6,8 +6,8 @@ Conflicts=epmd.service
[Service] [Service]
Type=notify Type=notify
User=rabbitmq User={{ rabbit_system_user_name }}
Group=rabbitmq Group={{ rabbit_system_group_name }}
LimitNOFILE=65535 LimitNOFILE=65535
NotifyAccess=all NotifyAccess=all
WorkingDirectory=/var/lib/rabbitmq WorkingDirectory=/var/lib/rabbitmq

View File

@ -31,5 +31,5 @@ _rabbitmq_erlang_repo:
filename: els-erlang filename: els-erlang
rabbitmq_distro_packages: rabbitmq_distro_packages:
- erlang-22.3-1.el7.x86_64 - "erlang-22.3-1.el{{ ansible_distribution_major_version }}.x86_64"
- "rabbitmq-server-{{ rabbitmq_package_version }}.el7.noarch" - "rabbitmq-server-{{ rabbitmq_package_version }}.el{{ ansible_distribution_major_version }}.noarch"