- block: - name: Copy certificates and root-ca to Filebeat copy: src: "{{ local_certs_path }}/config/{{ item }}" dest: /etc/filebeat/ mode: 0644 with_items: - root-ca.pem - "{{ inventory_hostname }}.key" - "{{ inventory_hostname }}.pem"