- hosts: localhost
  tasks:
    - ping:
        data: !vault |
          $ANSIBLE_VAULT;1.1;AES256
          35323961353038346165643738646465376139363061353835303739663538343266303232326635
          3365353662646236356665323135633630656238316530640a663362363763633436373439663031
          33663433383037396438656464636433653837376361313638366362333037323961316364363363
          3835616438623261650a636164376534376661393134326662326362323131373964313961623365
          3833
      register: ping_result

    - assert:
        that:
          - ping_result.ping == 'foo bar'
