---
- name: Read Nomad config file
  hosts: localhost
  gather_facts: no
  tasks:
    - name: Read nomad.hcl
      slurp:
        src: /etc/nomad.d/nomad.hcl
      register: nomad_config

    - name: Display Nomad config
      debug:
        msg: "{{ nomad_config['content'] | b64decode }}"