diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 9fde3c9..8f46481 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -7,12 +7,14 @@ state: present - name: Add Elasticsearch apt key. - apt_key: + ansible.builtin.get_url: url: https://artifacts.elastic.co/GPG-KEY-elasticsearch - state: present + dest: /usr/share/keyrings/elasticsearch-keyring.asc + mode: '0644' + force: true - name: Add Elasticsearch repository. apt_repository: - repo: 'deb https://artifacts.elastic.co/packages/{{ elasticsearch_version }}/apt stable main' + repo: 'deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.asc] https://artifacts.elastic.co/packages/{{ elasticsearch_version }}/apt stable main' state: present update_cache: true