Ansible

Write a single task that verifies all the files in files_list variable exist on the host

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

- name: Ensure all files exist
  assert:
    that:
      - item.stat.exists
  loop: "{{ files_list }}"