- hosts: localhost gather_facts: false tasks: - ping: data='{{ansible_password}}' register: dumb vars: ansible_python_interpreter: '{{ansible_playbook_python}}' - name: If we got here, password was passed! assert: that: - "dumb.ping == 'Testing123'"