Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4 KiB

---
- name: Remove randomly generated admin password
file: path={{ graylog_root_dir }}/meta/admin_pass state=absent
when: graylog_admin_pass is defined
tags: graylog
- name: Remove randomly generated password secret
file: path={{ graylog_root_dir }}/meta/pass_secret state=absent
when: graylog_pass_secret is defined
tags: graylog
- import_tasks: ../includes/get_rand_pass.yml
vars:
- pass_file: "{{ graylog_root_dir }}/meta/pass_secret"
when: graylog_pass_secret is not defined
tags: graylog
- set_fact: graylog_pass_secret={{ rand_pass }}
when: graylog_pass_secret is not defined
tags: graylog
- import_tasks: ../includes/get_rand_pass.yml
vars:
- pass_file: "{{ graylog_root_dir }}/meta/admin_pass"
when: graylog_admin_pass is not defined
tags: graylog
- set_fact: graylog_admin_pass={{ rand_pass }}
when: graylog_admin_pass is not defined
tags: graylog
- name: Deploy configuration
template: src={{ item }}.j2 dest={{ graylog_root_dir }}/etc/{{ item }} group=graylog mode=640
loop:
- server.conf
- log4j2.xml
notify: restart graylog-server
tags: graylog
- name: Deploy dehydrated hook
template: src=dehydrated_deploy_hook.j2 dest=/etc/dehydrated/hooks_deploy_cert.d/graylog mode=755
when: graylog_letsencrypt_cert is defined
tags: graylog
- name: Remove dehydrated hook
file: path=/etc/dehydrated/hooks_deploy_cert.d/graylog state=absent
when: graylog_letsencrypt_cert is not defined
tags: graylog