ansible-role-cerebro/tasks/base.yml
2019-09-06 16:30:56 +02:00

52 lines
995 B
YAML

---
- name: install dependencies
package:
name: default-jre
tags: cerebro
- name: create bin and config directories
file:
path: '{{ item }}'
owner: root
group: root
mode: 0755
state: directory
loop:
- '{{ cerebro_bin_dir }}'
- '{{ cerebro_config_dir }}'
tags: cerebro
- name: create group
group:
name: '{{ cerebro_group }}'
tags: cerebro
- name: create user
user:
name: '{{ cerebro_user }}'
group: '{{ cerebro_group }}'
home: '{{ cerebro_bin_dir }}'
shell: /bin/false
tags: cerebro
- name: create data directory
file:
path: '{{ cerebro_data_dir }}'
owner: root
group: '{{ cerebro_group }}'
mode: 0770
state: directory
tags: cerebro
- name: copy configurations
template:
src: '{{ item }}.j2'
dest: '{{ cerebro_config_dir }}/{{ item }}'
owner: root
group: '{{ cerebro_group }}'
mode: 0640
loop:
- cerebro.conf
- logback.xml
notify: restart cerebro
tags: cerebro