From 6dd11834ef7810d11702ab1e6e9a060f3cce8e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Acu=C3=B1a?= Date: Tue, 24 Jan 2023 09:02:31 -0300 Subject: [PATCH] GH Actions playbook step added --- .github/playbooks/single-wazuh.yml | 38 ++++++++++++++++++++++++++++++ .github/workflows/main.yml | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 .github/playbooks/single-wazuh.yml diff --git a/.github/playbooks/single-wazuh.yml b/.github/playbooks/single-wazuh.yml new file mode 100644 index 00000000..b3b3b7af --- /dev/null +++ b/.github/playbooks/single-wazuh.yml @@ -0,0 +1,38 @@ +--- +- name: ConvergeCerts + hosts: localhost + roles: + - role: ../../roles/wazuh/wazuh-indexer + perform_installation: false + vars: + instances: + node1: + name: node-1 # Important: must be equal to indexer_node_name. + ip: 127.0.0.1 + role: indexer + tags: + - generate-certs +- name: ConvergeInstall + hosts: localhost + roles: + # 1. Check packages + - role: ../../roles/wazuh/check-packages + become: no + delegate_to: localhost + run_once: true + # 2. Managers + - role: ../../roles/wazuh/ansible-wazuh-manager + vars: + - role: ../../roles/wazuh/ansible-filebeat-oss + vars: + - filebeat_output_indexer_hosts: + - "indexer_centos7:9200" + pre_tasks: + - name: (converge) fix missing packages in cloud images + apt: + name: + - unzip + - gpg-agent + state: present + update_cache: yes + when: ansible_distribution == "Ubuntu" \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed4a151b..94a3aa7f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,6 +47,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.x' + - name: Ansible Playbook run Wazuh Single node instance + run: ansible-playbook ./.github/playbooks/single-wazuh.yml stop-runner: name: Stop self-hosted EC2 runner needs: