# wait\_for not\_contains doesn't work

**URL:** <https://forum.ansible.com/t/wait-for-not-contains-doesnt-work/29521>\
**Category:** Ansible Project\
**Created:** [January 24, 2019, 9:07pm UTC](https://forum.ansible.com/t/wait-for-not-contains-doesnt-work/29521 "2019-01-24T21:07:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sahar](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@Sahar](https://forum.ansible.com/u/Sahar)\
**Post date:** [January 24, 2019, 9:07pm UTC](https://forum.ansible.com/t/wait-for-not-contains-doesnt-work/29521/1 "2019-01-24T21:07:09Z")

</div>

I’m trying to make sure “maximum 512” doesn’t exist in my config:

- name: check if the parameters has been changed to 1024  
asa\_command:  
commands:
- show run | i message-length maximum  
wait\_for: ‘result[0] not contains “maximum 512”’

Getting the following error:

pri/act/Fw4Script#red during task execution. To see the full traceback, use -vvv. The error was:  
fatal: [Fw4Script-01.tor.bellnhs.int]: FAILED! =\> {“changed”: false, “module\_stderr”: “Traceback (most recent call last):\n File "/home/shdianat/.ansible/tmp/ansible-local-202118IqBb9/ansible-tmp-1548363921.18-181639877187965/AnsiballZ\_asa\_command.py", line 113, in \n \_ansiballz\_main()\n File "/home/shdianat/.ansible/tmp/ansible-local-202118IqBb9/ansible-tmp-1548363921.18-181639877187965/AnsiballZ\_asa\_command.py", line 105, in \_ansiballz\_main\n invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)\n File "/home/shdianat/.ansible/tmp/ansible-local-202118IqBb9/ansible-tmp-1548363921.18-181639877187965/AnsiballZ\_asa\_command.py", line 48, in invoke\_module\n imp.load\_module(‘ **main** ’, mod, module, MOD\_DESC)\n File "/tmp/ansible\_asa\_command\_payload\_Kbducc/ **main**.py", line 195, in \n File "/tmp/ansible\_asa\_command\_payload\_Kbducc/ **main**.py", line 165, in main\n File "/tmp/ansible\_asa\_command\_payload\_Kbducc/ansible\_asa\_command\_payload.zip/ansible/module\_utils/network/asa/asa.py", line 124, in run\_commands\n File "/tmp/ansible\_asa\_command\_payload\_Kbducc/ansible\_asa\_command\_payload.zip/ansible/module\_utils/connection.py", line 173, in **rpc** \nansible.module\_utils.connection.ConnectionError: show message-length maximum\r\n ^\r\nERROR: % Invalid input detected at ‘^’ marker.\r\n\rpri/act/Fw4Script# \n”, “module\_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 1}

How can I fix this or what’s the alternative way to use?
