---
- name: Find Nomad service
  hosts: germany
  become: yes
  tasks:
    - name: List systemd services and filter for nomad
      shell: systemctl list-unit-files --type=service | grep -i nomad
      register: nomad_services
      changed_when: false
      failed_when: false

    - name: Display found services
      debug:
        var: nomad_services.stdout_lines