From 1d6e87aac9b8588cbb59637dfbe064024a1a1e72 Mon Sep 17 00:00:00 2001 From: Daniel Pawlik Date: Fri, 10 Dec 2021 14:06:43 +0100 Subject: [PATCH] Added playbook to deploy ci log processing services The playbook will be used to configure logscraper01.openstack.org host. Change-Id: I5b6e9e8c17b23e0cfb3b0e9aff50772a8d361dc1 --- ansible/playbooks/deploy-services.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ansible/playbooks/deploy-services.yml diff --git a/ansible/playbooks/deploy-services.yml b/ansible/playbooks/deploy-services.yml new file mode 100644 index 0000000..21ac151 --- /dev/null +++ b/ansible/playbooks/deploy-services.yml @@ -0,0 +1,44 @@ +--- +- name: Configure ci-log-processing services + hosts: localhost + become: true + vars: + # gearman worker + gearman_host: 0.0.0.0 + gearman_port: 4730 + # gearman client + gearman_client_host: "{{ gearman_host }}" + gearman_client_port: "{{ gearman_port }}" + # NOTE(dpawlik): For security reasons, the logstash host + # address was added to /etc/hosts. + output_host: "logstash" + output_port: 9999 + output_mode: tcp + # logscraper + tenant_builds: + - tenant: openstack + gearman_server: "{{ gearman_host }}" + gearman_port: "{{ gearman_port }}" + zuul_api_url: https://zuul.opendev.org/api/tenant/openstack + roles: + - loggearman + - logscraper + tasks: + - name: Install firewalld package + yum: + name: firewalld + state: present + + - name: Start and enable firewalld service + service: + name: firewalld + state: started + enabled: true + + - name: Configure firewalld + firewalld: + zone: internal + port: "{{ gearman_port }}/{{ output_mode }}" + state: enabled + permanent: true + immediate: true