--- - 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 apt key. apt_key: url: "{{ elasticrepo.gpg }}" id: "{{ elasticrepo.kid }}" state: present - name: Debian/Ubuntu | Add Filebeat repository. apt_repository: repo: "deb {{ elasticrepo.apt }} stable main" state: present update_cache: true changed_when: false