--- - name: ELK repository block: - name: Install the elasticsearch repo key apt_key: url={{ elasticsearch_repo_key }} state=present - name: Install the elasticsearch deb repository apt_repository: repo='{{ elasticsearch_repo }}' state=present update_cache=yes tags: [ 'ELK', 'elasticsearch', 'elk' ]