--- # Read-only: proves Ansible can reach each host. It changes nothing. - name: Check that every host responds hosts: all gather_facts: false tasks: - name: Ping host ansible.builtin.ping: - name: Check the Docker host hosts: docker_hosts gather_facts: false tasks: - name: Read Docker Compose version ansible.builtin.command: docker compose version register: check_connectivity_compose changed_when: false check_mode: false - name: Show Docker Compose version ansible.builtin.debug: msg: "{{ check_connectivity_compose.stdout }}" - name: Read stacks root ansible.builtin.stat: path: "{{ homelab_stacks_root }}" register: check_connectivity_stacks_root - name: Require stacks root ansible.builtin.assert: that: - check_connectivity_stacks_root.stat.isdir is defined - check_connectivity_stacks_root.stat.isdir fail_msg: "{{ homelab_stacks_root }} is missing or is not a directory" quiet: true