wait_for not_contains doesn't work

15 views
Skip to first unread message

Sahar

unread,
Jan 24, 2019, 4:07:09 PM1/24/19
to Ansible Project
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 <module>\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 <module>\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?


Reply all
Reply to author
Forward
0 new messages