---

- name: "Check checkpw filter"
  hosts: localhost
  gather_facts: no
  vars:
    pass1: "password1"
    pass2: "password2"
    hashed_pass1: "{{pass1|password_hash}}"
    hashed_pass2: "{{pass2|password_hash}}"
  tasks:
    - name: "Check various assertion"
      assert:
        that:
          - "pass1|checkpw(hashed_pass1) == True"
          - "pass1|checkpw(hashed_pass2) == False"
