mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-27 12:25:04 +01:00
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
---
|
|
|
|
- name: recieve {{domain}} certificate
|
|
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
|
|
|
|
- name: configure {{domain}}.conf
|
|
template: src=roles/nginx-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
|
notify: restart nginx
|
|
|
|
- name: create elasticsearch-sysctl.conf
|
|
copy:
|
|
src: "elasticsearch-sysctl.conf"
|
|
dest: /etc/sysctl.d/elasticsearch-sysctl.conf
|
|
owner: root
|
|
group: root
|
|
|
|
- name: set vm.max_map_count=262144
|
|
command:
|
|
cmd: sysctl -w vm.max_map_count=262144
|
|
|
|
- name: "create {{docker_elk_compose_path}}"
|
|
file:
|
|
path: "{{docker_elk_compose_path}}"
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: git pull docker-elk
|
|
git:
|
|
repo: "https://github.com/kevinveenbirkenbach/docker-elk.git"
|
|
dest: "{{docker_elk_compose_path}}"
|
|
update: yes
|
|
notify: recreate docker-elk
|
|
register: git_result
|
|
ignore_errors: true
|
|
|
|
- name: Warn if repo is not reachable
|
|
debug:
|
|
msg: "Warning: Repository is not reachable."
|
|
when: git_result.failed
|
|
|
|
- name: copy docker-compose.yml
|
|
template: src=docker-compose.yml.j2 dest={{docker_elk_compose_path}}docker-compose.yml
|
|
notify: recreate docker-elk
|
|
|
|
- name: copy elasticsearch.yml
|
|
template: src=elasticsearch.yml.j2 dest={{docker_elk_compose_path}}elasticsearch/config/elasticsearch.yml
|
|
notify: recreate docker-elk
|
|
|
|
- name: copy kibana.yml
|
|
template: src=kibana.yml.j2 dest={{docker_elk_compose_path}}kibana/config/kibana.yml
|
|
notify: recreate docker-elk
|
|
|
|
- name: copy logstash.yml
|
|
template: src=logstash.yml.j2 dest={{docker_elk_compose_path}}logstash/config/logstash.yml
|
|
notify: recreate docker-elk
|
|
|
|
- name: copy logstash.conf
|
|
template: src=logstash.conf.j2 dest={{docker_elk_compose_path}}logstash/pipeline/logstash.conf
|
|
notify: recreate docker-elk
|