rabbitmq: copy config files if missing

This commit is contained in:
Jérémy Lecour 2016-12-27 14:14:07 +01:00 committed by Jérémy Lecour
parent d4c13747f3
commit 9d70892fea
2 changed files with 9 additions and 16 deletions

View File

@ -0,0 +1,3 @@
# I am a complete /etc/rabbitmq/rabbitmq-env.conf file.
# Comment lines start with a hash character.
# This is a /bin/sh script file - use ordinary envt var syntax

View File

@ -5,24 +5,14 @@
with_items:
- rabbitmq-server
- name: test if rabbitmq-env.conf exists
stat:
path: /etc/rabbitmq/rabbitmq-env.conf
register: rabbitmq_env_file
- name: touch rabbitmq-env.conf
file:
path: /etc/rabbitmq/rabbitmq-env.conf
- name: create rabbitmq-env.conf
copy:
src: rabbitmq-env.conf
dest: /etc/rabbitmq/rabbitmq-env.conf
owner: rabbitmq
group: rabbitmq
mode: 0600
state: touch
when: not rabbitmq_env_file.stat.exists
- name: test if rabbitmq.config exists
stat:
path: /etc/rabbitmq/rabbitmq.config
register: rabbitmq_config_file
force: no
- name: create rabbitmq.config
copy:
@ -31,7 +21,7 @@
owner: rabbitmq
group: rabbitmq
mode: 0600
when: not rabbitmq_config_file.stat.exists
force: no
- name: set ulimit -n to 2048
lineinfile: