--- - name: Playbook for Bob the user hosts: all tasks: - name: Create Bob the user user: name=bob shell=/bin/bash comment="User of the machine {{ ansible_hostname }}" - user: name=linda - name: Create user picard with comment that contains hostname of the machine user: name: picard shell: /bin/bash comment: "User of the machine {{ ansible_hostname }} for the purpose of {{ moje_promenna }}"