Skip to content
Snippets Groups Projects
Commit d813f2ac authored by Temur Maisuradze's avatar Temur Maisuradze
Browse files

stop, restart and update-config scripts for filebeat

parent e667b308
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,6 @@ WORKDIR ${ZOOKEEPER_BASE_DIR}/zookeeper ...@@ -31,6 +31,6 @@ WORKDIR ${ZOOKEEPER_BASE_DIR}/zookeeper
#ENTRYPOINT ["/opt/zookeeper/bin/zkServer.sh"] #ENTRYPOINT ["/opt/zookeeper/bin/zkServer.sh"]
#CMD ["start-foreground"] #CMD ["start-foreground"]
RUN yum install supervisor -y RUN yum install supervisor rsync -y
COPY zookeepersupervisord.conf /etc/supervisord.conf COPY zookeepersupervisord.conf /etc/supervisord.conf
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
--- ---
# tasks file for filebeat
- name: Copy filebeat certificates - include: start.yml
copy:
src: "{{ item }}"
dest: "/opt/filebeat/"
mode: 0600
with_items:
- "{{playbook_dir}}/secrets/CA/issued/filebeat.crt"
- "{{playbook_dir}}/secrets/CA/private/filebeat.key"
become: true
tags: tags:
- start - start
- include: stop.yml
- name: Copy filebeat configuration file
template:
src: filebeat.yml.j2
dest: /opt/filebeat/filebeat.yml
become: true
tags: tags:
- start - stop
- stop-filebeat
- name: Start filebeat - include: update-config.yml
remote_user: root tags:
shell: "supervisorctl restart filebeat" - update-config
ignore_errors: yes - update-filebeat-config
- include: restart.yml
tags: tags:
- start - restart
- restart-filebeat
---
# tasks file for filebeat
- name: Restart filebeat
remote_user: root
shell: "supervisorctl restart filebeat"
ignore_errors: yes
---
# tasks file for filebeat
- name: Copy filebeat certificates
copy:
src: "{{ item }}"
dest: "/opt/filebeat/"
mode: 0600
with_items:
- "{{playbook_dir}}/secrets/CA/issued/filebeat.crt"
- "{{playbook_dir}}/secrets/CA/private/filebeat.key"
become: true
- name: Copy filebeat configuration file
template:
src: filebeat.yml.j2
dest: /opt/filebeat/filebeat.yml
become: true
- name: Restart filebeat
remote_user: root
shell: "supervisorctl restart filebeat"
ignore_errors: yes
---
# tasks file for filebeat
- name: Stop filebeat
remote_user: root
shell: "supervisorctl stop filebeat"
ignore_errors: yes
---
# tasks file for filebeat
- name: Copy filebeat configuration file
template:
src: filebeat.yml.j2
dest: /opt/filebeat/filebeat.yml
become: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment