failed instances

16 views
Skip to first unread message

Ashok Reddy

unread,
Aug 1, 2022, 2:54:07 AM8/1/22
to Ansible Project



---
- hosts: all
  become: true
  become_method: sudo
  gather_facts: false
  vars:
    - failed: "{{ ansible_play_hosts_all | difference(ansible_play_hosts) }}"
  tasks:
    - assert:
        that: ok | bool
    - debug:
        var: _failed

error;

TASK [assert] *********************************************************************************************************************************************************************************************
fatal: [modsec-pakistan.tt040sqa3.dev.sicpa.io]: FAILED! => {"msg": "The conditional check 'ok | bool' failed. The error was: error while evaluating conditional (ok | bool): 'ok' is undefined"}
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'ok | bool' failed. The error was: error while evaluating conditional (ok | bool): 'ok' is undefined"}

Abhijeet Kasurde

unread,
Aug 1, 2022, 3:46:55 AM8/1/22
to ansible...@googlegroups.com
'ok' is undefined

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8f0640f3-5fa2-4e29-abcf-d320ccaffe2dn%40googlegroups.com.


--
Thanks,
Abhijeet Kasurde

Dick Visser

unread,
Aug 1, 2022, 4:08:40 AM8/1/22
to ansible...@googlegroups.com
Once you've solved that you will also run into another undefined variable: _failed



Reply all
Reply to author
Forward
0 new messages