--- - name: Debian/Ubuntu | Install apt-transport-https and ca-certificates apt: name: - apt-transport-https - ca-certificates state: present register: filebeat_ca_packages_install until: filebeat_ca_packages_install is succeeded - name: Debian/Ubuntu | Add Elasticsearch GPG key. apt_key: url: "{{ elasticrepo.gpg }}" id: 46095ACC8548582C1A2699A9D27D666CD88E42B4 state: present - name: Debian/Ubuntu | Add Filebeat repository. apt_repository: repo: "deb {{ elasticrepo.apt }} stable main" state: present update_cache: true changed_when: false