ansible 2 - failed_when as a list

`

  • name: install it
    become: True
    register: command_result
    shell:
    ./my_install
    chdir=/tmp/setup
    failed_when:
  • “‘already installed’ not in command_result.stdout”
  • “command_result.rc != 0”

`

fails with the following message:

The field ‘failed_when’ is supposed to be a string type, however the incoming data structure is
a <class ‘ansible.parsing.yaml.objects.AnsibleSequence’>

In ansible 1.8 this playbook worked. Is there a new feature which replaced the list in failed_when?

no, this is a bug, failed_when, like all conditionals should take a
string or a list of strings

Thanks, I opened an issue for it