hosts: [srvs] srv1 disk=/dev/sdb srv2 disk=/dev/sdc tasks: - name: Return the hostname and that hostname disk var debug: msg: \' hostname: {{ item }} - disk