--- - hosts: bastion gather_facts: true become: false tasks: - name: Run hostname -a command: hostname -a register: hostname_out - name: Show hostname output debug: var: hostname_out.stdout