From 779eeaa2c125b0ac09ad9919cff9377d3373dce3 Mon Sep 17 00:00:00 2001 From: Stefan Horning Date: Tue, 30 Jul 2024 16:08:44 +0200 Subject: [PATCH 1/3] New apt key setup --- .github/workflows/ansible_test.yml | 4 ++-- tasks/main.yml | 8 ++++---- vars/main.yml | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ansible_test.yml b/.github/workflows/ansible_test.yml index b639a6c..906c1da 100644 --- a/.github/workflows/ansible_test.yml +++ b/.github/workflows/ansible_test.yml @@ -11,10 +11,10 @@ jobs: - name: Checkout code from Github uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.10 uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.10 - name: Install latest Ansible through pip run: pip install ansible diff --git a/tasks/main.yml b/tasks/main.yml index 9ed09e7..4bad408 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,16 +1,16 @@ --- # tasks file for mediafellows.filebeat -- name: Add elastic apt repo key (for all elastic software) - ansible.builtin.apt_key: +- name: Install elastic apt repo key (for all elastic software) + ansible.builtin.get_url: url: "https://packages.elastic.co/GPG-KEY-elasticsearch" - state: present + dest: "{{ filebeat_repo_apt_key_dest }}" # Install filebeat as a logstash client (to deliver logs), just for demoing - name: Add filebeat (Elastic) apt repo ansible.builtin.apt_repository: - repo: "deb https://artifacts.elastic.co/packages/{{ filebeat_major_version }}/apt stable main" + repo: deb [signed-by={{ filebeat_repo_apt_key_dest }}] https://artifacts.elastic.co/packages/{{ filebeat_major_version }}/apt stable main" update_cache: yes state: present diff --git a/vars/main.yml b/vars/main.yml index 7f69542..e2e3b33 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,3 +1,4 @@ --- filebeat_all_prospectors: "{{ filebeat_prospectors + filebeat_extra_prospectors }}" +filebeat_repo_apt_key_dest: '/etc/apt/keyrings/packages-elastic.asc' From ae26ac843a52eecffe322dbce3820670a5969f19 Mon Sep 17 00:00:00 2001 From: Stefan Horning Date: Tue, 30 Jul 2024 16:11:03 +0200 Subject: [PATCH 2/3] CI fix --- .github/workflows/ansible_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ansible_test.yml b/.github/workflows/ansible_test.yml index 906c1da..57b0643 100644 --- a/.github/workflows/ansible_test.yml +++ b/.github/workflows/ansible_test.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v1 with: - python-version: 3.10 + python-version: 3.10.14 - name: Install latest Ansible through pip run: pip install ansible From 7438e826bc654a09d1fb815eb9bccc40e46cb74b Mon Sep 17 00:00:00 2001 From: Stefan Horning Date: Tue, 30 Jul 2024 16:26:37 +0200 Subject: [PATCH 3/3] Remove leftover quote --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 4bad408..d530932 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,7 +10,7 @@ - name: Add filebeat (Elastic) apt repo ansible.builtin.apt_repository: - repo: deb [signed-by={{ filebeat_repo_apt_key_dest }}] https://artifacts.elastic.co/packages/{{ filebeat_major_version }}/apt stable main" + repo: deb [signed-by={{ filebeat_repo_apt_key_dest }}] https://artifacts.elastic.co/packages/{{ filebeat_major_version }}/apt stable main update_cache: yes state: present