Using Ansible Rulebook to pass along events payloads to the playbook, on first action/trigger and execution everything works as expected, when a second execution comes along instead of the proper events payload that i would expect to be sent, it sends the entire post instead of just the payload from the post.
This is the code i didnt expect to happen as you can see its the full post rather than the payload
[root@8cb336c8-8dc8-4fee-b9f1-fdaa7ec4cc61 f5-bd-ansible-security-labs]# ansible-rulebook --rulebook rulebooks/webhook-block-ips.yaml --inventory ../inventory/inventory_2.yml --print-events --verbose
2023-05-17 15:39:40,415 - ansible_rulebook.app - INFO - Starting sources
2023-05-17 15:39:40,415 - ansible_rulebook.app - INFO - Starting rules
2023-05-17 15:39:40,415 - ansible_rulebook.engine - INFO - run_ruleset
2023-05-17 15:39:40,415 - drools.ruleset - INFO - Using jar: /usr/local/lib/python3.9/site-packages/drools/jars/drools-ansible-rulebook-integration-runtime-1.0.1-SNAPSHOT.jar
2023-05-17 15:39:41 137 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.AbstractRulesEvaluator - Start automatic pseudo clock with a tick every 100 milliseconds
2023-05-17 15:39:41,141 - ansible_rulebook.engine - INFO - ruleset define: {"name": "Listen for events on a webhook", "hosts": ["all"], "sources": [{"EventSource": {"name": "ansible.eda.webhook", "source_name": "ansible.eda.webhook", "source_args": {"host": "0.0.0.0", "port": 5000}, "source_filters": []}}], "rules": [{"Rule": {"name": "Say Hello", "condition": {"AllCondition": [{"EqualsExpression": {"lhs": {"Event": "payload.message"}, "rhs": {"String": "Ansible Please Block Some IPs"}}}]}, "actions": [{"Action": {"action": "run_playbook", "action_args": {"name": "f5-playbooks/block-ips-playbook/block-ips.yaml", "var_root": "payload", "post_events": true}}}], "enabled": true}}]}
2023-05-17 15:39:41,161 - ansible_rulebook.engine - INFO - load source
2023-05-17 15:39:41,741 - ansible_rulebook.engine - INFO - load source filters
2023-05-17 15:39:41,741 - ansible_rulebook.engine - INFO - loading eda.builtin.insert_meta_info
2023-05-17 15:39:42,304 - ansible_rulebook.engine - INFO - Calling main in ansible.eda.webhook
2023-05-17 15:39:42,307 - ansible_rulebook.engine - INFO - Waiting for all ruleset tasks to end
2023-05-17 15:39:42,307 - ansible_rulebook.rule_set_runner - INFO - Waiting for actions on events from Listen for events on a webhook
2023-05-17 15:39:42,307 - ansible_rulebook.rule_set_runner - INFO - Waiting for events, ruleset: Listen for events on a webhook
2023-05-17 15:39:42 307 [drools-async-evaluator-thread] INFO org.drools.ansible.rulebook.integration.api.io.RuleExecutorChannel - Async channel connected
2023-05-17 15:42:02,324 - aiohttp.access - INFO - 10.1.1.5 [17/May/2023:19:42:02 +0000] "POST /endpoint HTTP/1.1" 200 158 "-" "Apache-HttpClient/4.5.10 (Java/16.0.2)"
{ 'meta': { 'endpoint': 'endpoint',
'headers': { 'Accept-Charset': 'UTF-8',
'Accept-Encoding': 'gzip,deflate',
'Connection': 'Keep-Alive',
'Content-Length': '373',
'Content-Type': 'application/json; '
'charset=UTF-8',
'Host': '10.1.1.11:5000',
'User-Agent': 'Apache-HttpClient/4.5.10 '
'(Java/16.0.2)'},
'received_at': '2023-05-17T19:42:02.323578Z',
'source': { 'name': 'ansible.eda.webhook',
'type': 'ansible.eda.webhook'},
'uuid': 'f7fba787-1b15-42c6-a64e-97b1f5673c45'},
'payload': { 'message': 'Ansible Please Block Some IPs',
'payload': '114.225.248.7, 122.159.243.78, 49.66.141.203, '
'47.98.58.62, 139.203.90.78, 43.251.247.220, '
'113.97.123.155, 115.170.100.80, 106.27.28.238, '
'49.69.74.215, 125.86.131.83, 123.160.232.22, '
'120.76.45.146, 112.194.39.209, 122.236.26.112, '
'42.187.79.104, 60.2.184.96, 60.191.138.128, '
'124.65.127.96, 91.191.249.134, '}}
2023-05-17 15:42:02 360 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.RegisterOnlyAgendaFilter - Activation of effective rule "Say Hello" with facts: {m={payload={payload=114.225.248.7, 122.159.243.78, 49.66.141.203, 47.98.58.62, 139.203.90.78, 43.251.247.220, 113.97.123.155, 115.170.100.80, 106.27.28.238, 49.69.74.215, 125.86.131.83, 123.160.232.22, 120.76.45.146, 112.194.39.209, 122.236.26.112, 42.187.79.104, 60.2.184.96, 60.191.138.128, 124.65.127.96, 91.191.249.134, , message=Ansible Please Block Some IPs}, meta={headers={Accept-Charset=UTF-8, Connection=Keep-Alive, User-Agent=Apache-HttpClient/4.5.10 (Java/16.0.2), Host=10.1.1.11:5000, Accept-Encoding=gzip,deflate, Content-Length=373, Content-Type=application/json; charset=UTF-8}, endpoint=endpoint, received_at=2023-05-17T19:42:02.323578Z, source={name=ansible.eda.webhook, type=ansible.eda.webhook}, uuid=f7fba787-1b15-42c6-a64e-97b1f5673c45}}}
2023-05-17 15:42:02,368 - ansible_rulebook.rule_generator - INFO - calling Say Hello
2023-05-17 15:42:02,369 - ansible_rulebook.rule_set_runner - INFO - call_action run_playbook
2023-05-17 15:42:02,369 - ansible_rulebook.rule_set_runner - INFO - Update variables [{'event': {'payload': {'payload': '114.225.248.7, 122.159.243.78, 49.66.141.203, 47.98.58.62, 139.203.90.78, 43.251.247.220, 113.97.123.155, 115.170.100.80, 106.27.28.238, 49.69.74.215, 125.86.131.83, 123.160.232.22, 120.76.45.146, 112.194.39.209, 122.236.26.112, 42.187.79.104, 60.2.184.96, 60.191.138.128, 124.65.127.96, 91.191.249.134, ', 'message': 'Ansible Please Block Some IPs'}, 'meta': {'headers': {'Accept-Charset': 'UTF-8', 'Connection': 'Keep-Alive', 'User-Agent': 'Apache-HttpClient/4.5.10 (Java/16.0.2)', 'Host': '10.1.1.11:5000', 'Accept-Encoding': 'gzip,deflate', 'Content-Length': '373', 'Content-Type': 'application/json; charset=UTF-8'}, 'endpoint': 'endpoint', 'received_at': '2023-05-17T19:42:02.323578Z', 'source': {'name': 'ansible.eda.webhook', 'type': 'ansible.eda.webhook'}, 'uuid': 'f7fba787-1b15-42c6-a64e-97b1f5673c45'}}}] with new root [payload]
2023-05-17 15:42:02,369 - ansible_rulebook.rule_set_runner - INFO - substitute_variables [{'name': 'f5-playbooks/block-ips-playbook/block-ips.yaml', 'post_events': True}] [{'event': {'payload': '114.225.248.7, 122.159.243.78, 49.66.141.203, 47.98.58.62, 139.203.90.78, 43.251.247.220, 113.97.123.155, 115.170.100.80, 106.27.28.238, 49.69.74.215, 125.86.131.83, 123.160.232.22, 120.76.45.146, 112.194.39.209, 122.236.26.112, 42.187.79.104, 60.2.184.96, 60.191.138.128, 124.65.127.96, 91.191.249.134, ', 'message': 'Ansible Please Block Some IPs'}}]
2023-05-17 15:42:02,369 - ansible_rulebook.rule_set_runner - INFO - action args: {'name': 'f5-playbooks/block-ips-playbook/block-ips.yaml', 'post_events': True}
2023-05-17 15:42:02,370 - ansible_rulebook.builtin - INFO - running Ansible playbook: f5-playbooks/block-ips-playbook/block-ips.yaml
2023-05-17 15:42:02,372 - ansible_rulebook.builtin - INFO - ruleset: Listen for events on a webhook, rule: Say Hello
2023-05-17 15:42:02,372 - ansible_rulebook.builtin - INFO - Calling Ansible runner
PLAY [ASM Policy Update with Blocked URLS, IPs or Both] ************************
TASK [Setup provider] **********************************************************
ok: [f5]
TASK [debug] *******************************************************************
ok: [f5] => {
"msg": {
"message": "Ansible Please Block Some IPs",
"payload": "114.225.248.7, 122.159.243.78, 49.66.141.203, 47.98.58.62, 139.203.90.78, 43.251.247.220, 113.97.123.155, 115.170.100.80, 106.27.28.238, 49.69.74.215, 125.86.131.83, 123.160.232.22, 120.76.45.146, 112.194.39.209, 122.236.26.112, 42.187.79.104, 60.2.184.96, 60.191.138.128, 124.65.127.96, 91.191.249.134, "
}
}
TASK [debug] *******************************************************************
ok: [f5] => {
"msg": "114.225.248.7, 122.159.243.78, 49.66.141.203, 47.98.58.62, 139.203.90.78, 43.251.247.220, 113.97.123.155, 115.170.100.80, 106.27.28.238, 49.69.74.215, 125.86.131.83, 123.160.232.22, 120.76.45.146, 112.194.39.209, 122.236.26.112, 42.187.79.104, 60.2.184.96, 60.191.138.128, 124.65.127.96, 91.191.249.134, "
}
TASK [Create Array from BlockedIPs] ********************************************
ok: [f5]
TASK [Create Array from BlockedIPs] ********************************************
ok: [f5]
TASK [debug] *******************************************************************
ok: [f5] => {
"msg": [
"114.225.248.7",
"122.159.243.78",
"49.66.141.203",
"47.98.58.62",
"139.203.90.78",
"43.251.247.220",
"113.97.123.155",
"115.170.100.80",
"106.27.28.238",
"49.69.74.215",
"125.86.131.83",
"123.160.232.22",
"120.76.45.146",
"112.194.39.209",
"122.236.26.112",
"42.187.79.104",
"60.2.184.96",
"60.191.138.128",
"124.65.127.96",
"91.191.249.134"
]
}
TASK [Fetching ASM Policy] *****************************************************
changed: [f5]
TASK [Create tmp directory if it does not exist] *******************************
ok: [f5 -> localhost]
TASK [ansible.builtin.copy] ****************************************************
changed: [f5 -> localhost]
TASK [Validate Existing IP Addresses] ******************************************
failed: [f5 -> localhost] (item=114.225.248.7) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>114.225.248.7\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006000", "end": "2023-05-17 15:42:15.423592", "item": "114.225.248.7", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:15.417592", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=122.159.243.78) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>122.159.243.78\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006376", "end": "2023-05-17 15:42:15.675942", "item": "122.159.243.78", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:15.669566", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=49.66.141.203) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>49.66.141.203\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006154", "end": "2023-05-17 15:42:15.903503", "item": "49.66.141.203", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:15.897349", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=47.98.58.62) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>47.98.58.62\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005651", "end": "2023-05-17 15:42:16.133725", "item": "47.98.58.62", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:16.128074", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=139.203.90.78) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>139.203.90.78\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005888", "end": "2023-05-17 15:42:16.361906", "item": "139.203.90.78", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:16.356018", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=43.251.247.220) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>43.251.247.220\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005859", "end": "2023-05-17 15:42:16.616423", "item": "43.251.247.220", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:16.610564", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=113.97.123.155) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>113.97.123.155\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005949", "end": "2023-05-17 15:42:16.846424", "item": "113.97.123.155", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:16.840475", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=115.170.100.80) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>115.170.100.80\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005615", "end": "2023-05-17 15:42:17.074025", "item": "115.170.100.80", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:17.068410", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=106.27.28.238) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>106.27.28.238\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006197", "end": "2023-05-17 15:42:17.308347", "item": "106.27.28.238", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:17.302150", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=49.69.74.215) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>49.69.74.215\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005887", "end": "2023-05-17 15:42:17.540660", "item": "49.69.74.215", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:17.534773", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=125.86.131.83) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>125.86.131.83\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005887", "end": "2023-05-17 15:42:17.772369", "item": "125.86.131.83", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:17.766482", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=123.160.232.22) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>123.160.232.22\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005604", "end": "2023-05-17 15:42:18.002185", "item": "123.160.232.22", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:17.996581", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=120.76.45.146) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>120.76.45.146\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006546", "end": "2023-05-17 15:42:18.235037", "item": "120.76.45.146", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:18.228491", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=112.194.39.209) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>112.194.39.209\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006281", "end": "2023-05-17 15:42:18.468348", "item": "112.194.39.209", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:18.462067", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=122.236.26.112) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>122.236.26.112\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006514", "end": "2023-05-17 15:42:18.712462", "item": "122.236.26.112", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:18.705948", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=42.187.79.104) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>42.187.79.104\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005660", "end": "2023-05-17 15:42:18.952829", "item": "42.187.79.104", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:18.947169", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=60.2.184.96) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>60.2.184.96\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006056", "end": "2023-05-17 15:42:19.182045", "item": "60.2.184.96", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:19.175989", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=60.191.138.128) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>60.191.138.128\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.006157", "end": "2023-05-17 15:42:19.410286", "item": "60.191.138.128", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:19.404129", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=124.65.127.96) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>124.65.127.96\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005954", "end": "2023-05-17 15:42:19.649318", "item": "124.65.127.96", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:19.643364", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [f5 -> localhost] (item=91.191.249.134) => {"ansible_loop_var": "item", "changed": true, "cmd": "grep \"<ip_address>91.191.249.134\" /tmp/f5/WAF-POLICY.xml", "delta": "0:00:00.005733", "end": "2023-05-17 15:42:19.875205", "item": "91.191.249.134", "msg": "non-zero return code", "rc": 1, "start": "2023-05-17 15:42:19.869472", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
...ignoring
TASK [Add Disallowed IPs] ******************************************************
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>114.225.248.7" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:15.417592', 'end': '2023-05-17 15:42:15.423592', 'delta': '0:00:00.006000', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>114.225.248.7" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '114.225.248.7', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>122.159.243.78" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:15.669566', 'end': '2023-05-17 15:42:15.675942', 'delta': '0:00:00.006376', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>122.159.243.78" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '122.159.243.78', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>49.66.141.203" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:15.897349', 'end': '2023-05-17 15:42:15.903503', 'delta': '0:00:00.006154', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>49.66.141.203" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '49.66.141.203', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>47.98.58.62" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:16.128074', 'end': '2023-05-17 15:42:16.133725', 'delta': '0:00:00.005651', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>47.98.58.62" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '47.98.58.62', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>139.203.90.78" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:16.356018', 'end': '2023-05-17 15:42:16.361906', 'delta': '0:00:00.005888', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>139.203.90.78" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '139.203.90.78', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>43.251.247.220" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:16.610564', 'end': '2023-05-17 15:42:16.616423', 'delta': '0:00:00.005859', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>43.251.247.220" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '43.251.247.220', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>113.97.123.155" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:16.840475', 'end': '2023-05-17 15:42:16.846424', 'delta': '0:00:00.005949', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>113.97.123.155" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '113.97.123.155', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>115.170.100.80" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:17.068410', 'end': '2023-05-17 15:42:17.074025', 'delta': '0:00:00.005615', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>115.170.100.80" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '115.170.100.80', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>106.27.28.238" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:17.302150', 'end': '2023-05-17 15:42:17.308347', 'delta': '0:00:00.006197', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>106.27.28.238" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '106.27.28.238', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>49.69.74.215" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:17.534773', 'end': '2023-05-17 15:42:17.540660', 'delta': '0:00:00.005887', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>49.69.74.215" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '49.69.74.215', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>125.86.131.83" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:17.766482', 'end': '2023-05-17 15:42:17.772369', 'delta': '0:00:00.005887', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>125.86.131.83" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '125.86.131.83', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>123.160.232.22" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:17.996581', 'end': '2023-05-17 15:42:18.002185', 'delta': '0:00:00.005604', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>123.160.232.22" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '123.160.232.22', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>120.76.45.146" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:18.228491', 'end': '2023-05-17 15:42:18.235037', 'delta': '0:00:00.006546', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>120.76.45.146" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '120.76.45.146', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>112.194.39.209" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:18.462067', 'end': '2023-05-17 15:42:18.468348', 'delta': '0:00:00.006281', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>112.194.39.209" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '112.194.39.209', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>122.236.26.112" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:18.705948', 'end': '2023-05-17 15:42:18.712462', 'delta': '0:00:00.006514', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>122.236.26.112" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '122.236.26.112', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>42.187.79.104" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:18.947169', 'end': '2023-05-17 15:42:18.952829', 'delta': '0:00:00.005660', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>42.187.79.104" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '42.187.79.104', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>60.2.184.96" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:19.175989', 'end': '2023-05-17 15:42:19.182045', 'delta': '0:00:00.006056', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>60.2.184.96" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '60.2.184.96', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>60.191.138.128" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:19.404129', 'end': '2023-05-17 15:42:19.410286', 'delta': '0:00:00.006157', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>60.191.138.128" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '60.191.138.128', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>124.65.127.96" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:19.643364', 'end': '2023-05-17 15:42:19.649318', 'delta': '0:00:00.005954', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>124.65.127.96" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '124.65.127.96', 'ansible_loop_var': 'item'})
changed: [f5 -> localhost] => (item={'changed': True, 'stdout': '', 'stderr': '', 'rc': 1, 'cmd': 'grep "<ip_address>91.191.249.134" /tmp/f5/WAF-POLICY.xml', 'start': '2023-05-17 15:42:19.869472', 'end': '2023-05-17 15:42:19.875205', 'delta': '0:00:00.005733', 'failed': True, 'msg': 'non-zero return code', 'invocation': {'module_args': {'_raw_params': 'grep "<ip_address>91.191.249.134" /tmp/f5/WAF-POLICY.xml', '_uses_shell': True, 'stdin_add_newline': True, 'strip_empty_ends': True, 'argv': None, 'chdir': None, 'executable': None, 'creates': None, 'removes': None, 'stdin': None}}, 'stdout_lines': [], 'stderr_lines': [], 'item': '91.191.249.134', 'ansible_loop_var': 'item'})
TASK [Create an LTM policy] ****************************************************
ok: [f5 -> localhost]
TASK [Import ASM policy] *******************************************************
changed: [f5 -> localhost]
TASK [Replace a forward action with an ASM action] *****************************
ok: [f5 -> localhost]
TASK [Deploy Draft ASM policy] *************************************************
ok: [f5 -> localhost]
TASK [Activate ASM Policy] *****************************************************
ok: [f5 -> localhost]
TASK [Publish ASM Policy via TMSH] *********************************************
[WARNING]: Using "write" commands is not idempotent. You should use a module
that is specifically made for that. If such a module does not exist, then
please file a bug. The command in question is "publish asm policy WAF-
POLICY..."
ok: [f5 -> localhost]
TASK [Change ASM Policy to Blocking] *******************************************
[WARNING]: Using "write" commands is not idempotent. You should use a module
that is specifically made for that. If such a module does not exist, then
please file a bug. The command in question is "modify asm policy WAF-POLICY
blocking-mo..."
changed: [f5]
PLAY RECAP *********************************************************************
f5 : ok=18 changed=6 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1
2023-05-17 15:43:14,316 - ansible_rulebook.builtin - INFO - Ansible Runner Queue task cancelled
2023-05-17 15:43:14,317 - ansible_rulebook.builtin - INFO - Playbook rc: 0, status: successful
2023-05-17 15:43:14,320 - ansible_rulebook.rule_set_runner - INFO - Task action::run_playbook::Listen for events on a webhook::Say Hello finished, active actions 0
2023-05-17 15:45:02,129 - aiohttp.access - INFO - 10.1.1.5 [17/May/2023:19:45:02 +0000] "POST /endpoint HTTP/1.1" 200 158 "-" "Apache-HttpClient/4.5.10 (Java/16.0.2)"
{ 'meta': { 'endpoint': 'endpoint',
'headers': { 'Accept-Charset': 'UTF-8',
'Accept-Encoding': 'gzip,deflate',
'Connection': 'Keep-Alive',
'Content-Length': '376',
'Content-Type': 'application/json; '
'charset=UTF-8',
'Host': '10.1.1.11:5000',
'User-Agent': 'Apache-HttpClient/4.5.10 '
'(Java/16.0.2)'},
'received_at': '2023-05-17T19:45:02.128666Z',
'source': { 'name': 'ansible.eda.webhook',
'type': 'ansible.eda.webhook'},
'uuid': 'ddf1b125-1e9b-45d0-bd71-c5a3f338bd57'},
'payload': { 'message': 'Ansible Please Block Some IPs',
'payload': '61.159.83.27, 106.31.225.181, 124.113.69.146, '
'110.193.169.10, 36.105.233.171, 36.117.197.225, '
'113.91.81.178, 115.207.239.18, 110.252.60.154, '
'117.42.208.29, 121.227.208.31, 121.227.153.3, '
'46.250.37.60, 118.224.199.107, 118.89.240.8, '
'36.101.190.239, 80.250.71.98, 58.38.47.241, '
'122.76.41.113, 59.108.107.170, '}}
2023-05-17 15:45:02 132 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.RegisterOnlyAgendaFilter - Activation of effective rule "Say Hello" with facts: {m={payload={payload=61.159.83.27, 106.31.225.181, 124.113.69.146, 110.193.169.10, 36.105.233.171, 36.117.197.225, 113.91.81.178, 115.207.239.18, 110.252.60.154, 117.42.208.29, 121.227.208.31, 121.227.153.3, 46.250.37.60, 118.224.199.107, 118.89.240.8, 36.101.190.239, 80.250.71.98, 58.38.47.241, 122.76.41.113, 59.108.107.170, , message=Ansible Please Block Some IPs}, meta={headers={Accept-Charset=UTF-8, Connection=Keep-Alive, User-Agent=Apache-HttpClient/4.5.10 (Java/16.0.2), Host=10.1.1.11:5000, Accept-Encoding=gzip,deflate, Content-Length=376, Content-Type=application/json; charset=UTF-8}, endpoint=endpoint, received_at=2023-05-17T19:45:02.128666Z, source={name=ansible.eda.webhook, type=ansible.eda.webhook}, uuid=ddf1b125-1e9b-45d0-bd71-c5a3f338bd57}}}
2023-05-17 15:45:02,133 - ansible_rulebook.rule_generator - INFO - calling Say Hello
2023-05-17 15:45:02,133 - ansible_rulebook.rule_set_runner - INFO - call_action run_playbook
2023-05-17 15:45:02,134 - ansible_rulebook.rule_set_runner - INFO - substitute_variables [{'name': 'f5-playbooks/block-ips-playbook/block-ips.yaml', 'post_events': True}] [{'event': {'payload': {'payload': '61.159.83.27, 106.31.225.181, 124.113.69.146, 110.193.169.10, 36.105.233.171, 36.117.197.225, 113.91.81.178, 115.207.239.18, 110.252.60.154, 117.42.208.29, 121.227.208.31, 121.227.153.3, 46.250.37.60, 118.224.199.107, 118.89.240.8, 36.101.190.239, 80.250.71.98, 58.38.47.241, 122.76.41.113, 59.108.107.170, ', 'message': 'Ansible Please Block Some IPs'}, 'meta': {'headers': {'Accept-Charset': 'UTF-8', 'Connection': 'Keep-Alive', 'User-Agent': 'Apache-HttpClient/4.5.10 (Java/16.0.2)', 'Host': '10.1.1.11:5000', 'Accept-Encoding': 'gzip,deflate', 'Content-Length': '376', 'Content-Type': 'application/json; charset=UTF-8'}, 'endpoint': 'endpoint', 'received_at': '2023-05-17T19:45:02.128666Z', 'source': {'name': 'ansible.eda.webhook', 'type': 'ansible.eda.webhook'}, 'uuid': 'ddf1b125-1e9b-45d0-bd71-c5a3f338bd57'}}}]
2023-05-17 15:45:02,134 - ansible_rulebook.rule_set_runner - INFO - action args: {'name': 'f5-playbooks/block-ips-playbook/block-ips.yaml', 'post_events': True}
2023-05-17 15:45:02,134 - ansible_rulebook.builtin - INFO - running Ansible playbook: f5-playbooks/block-ips-playbook/block-ips.yaml
2023-05-17 15:45:02,137 - ansible_rulebook.builtin - INFO - ruleset: Listen for events on a webhook, rule: Say Hello
2023-05-17 15:45:02,138 - ansible_rulebook.builtin - INFO - Calling Ansible runner
PLAY [ASM Policy Update with Blocked URLS, IPs or Both] ************************
TASK [Setup provider] **********************************************************
ok: [f5]
TASK [debug] *******************************************************************
ok: [f5] => {
"msg": {
"meta": {
"endpoint": "endpoint",
"headers": {
"Accept-Charset": "UTF-8",
"Accept-Encoding": "gzip,deflate",
"Connection": "Keep-Alive",
"Content-Length": "376",
"Content-Type": "application/json; charset=UTF-8",
"Host": "10.1.1.11:5000",
"User-Agent": "Apache-HttpClient/4.5.10 (Java/16.0.2)"
},
"received_at": "2023-05-17T19:45:02.128666Z",
"source": {
"name": "ansible.eda.webhook",
"type": "ansible.eda.webhook"
},
"uuid": "ddf1b125-1e9b-45d0-bd71-c5a3f338bd57"
},
"payload": {
"message": "Ansible Please Block Some IPs",
"payload": "61.159.83.27, 106.31.225.181, 124.113.69.146, 110.193.169.10, 36.105.233.171, 36.117.197.225, 113.91.81.178, 115.207.239.18, 110.252.60.154, 117.42.208.29, 121.227.208.31, 121.227.153.3, 46.250.37.60, 118.224.199.107, 118.89.240.8, 36.101.190.239, 80.250.71.98, 58.38.47.241, 122.76.41.113, 59.108.107.170, "
}
}
}
TASK [debug] *******************************************************************
ok: [f5] => {
"msg": {
"message": "Ansible Please Block Some IPs",
"payload": "61.159.83.27, 106.31.225.181, 124.113.69.146, 110.193.169.10, 36.105.233.171, 36.117.197.225, 113.91.81.178, 115.207.239.18, 110.252.60.154, 117.42.208.29, 121.227.208.31, 121.227.153.3, 46.250.37.60, 118.224.199.107, 118.89.240.8, 36.101.190.239, 80.250.71.98, 58.38.47.241, 122.76.41.113, 59.108.107.170, "
}
}
TASK [Create Array from BlockedIPs] ********************************************
fatal: [f5]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'split'. 'dict object' has no attribute 'split'\n\nThe error appears to be in '/tmp/run_playbookcbp6leub/project/block-ips.yaml': line 32, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Create Array from BlockedIPs\n ^ here\n"}
PLAY RECAP *********************************************************************
f5 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
2023-05-17 15:45:03,245 - ansible_rulebook.builtin - INFO - Ansible Runner Queue task cancelled
2023-05-17 15:45:03,246 - ansible_rulebook.builtin - INFO - Playbook rc: 2, status: failed
2023-05-17 15:45:03,247 - ansible_rulebook.builtin - ERROR -
PLAY [ASM Policy Update with Blocked URLS, IPs or Both] ************************
TASK [Setup provider] **********************************************************
ok: [f5]
TASK [debug] *******************************************************************
ok: [f5] => {
"msg": {
"meta": {
"endpoint": "endpoint",
"headers": {
"Accept-Charset": "UTF-8",
"Accept-Encoding": "gzip,deflate",
"Connection": "Keep-Alive",
"Content-Length": "376",
"Content-Type": "application/json; charset=UTF-8",
"Host": "10.1.1.11:5000",
"User-Agent": "Apache-HttpClient/4.5.10 (Java/16.0.2)"
},
"received_at": "2023-05-17T19:45:02.128666Z",
"source": {
"name": "ansible.eda.webhook",
"type": "ansible.eda.webhook"
},
"uuid": "ddf1b125-1e9b-45d0-bd71-c5a3f338bd57"
},
"payload": {
"message": "Ansible Please Block Some IPs",
"payload": "61.159.83.27, 106.31.225.181, 124.113.69.146, 110.193.169.10, 36.105.233.171, 36.117.197.225, 113.91.81.178, 115.207.239.18, 110.252.60.154, 117.42.208.29, 121.227.208.31, 121.227.153.3, 46.250.37.60, 118.224.199.107, 118.89.240.8, 36.101.190.239, 80.250.71.98, 58.38.47.241, 122.76.41.113, 59.108.107.170, "
}
}
}
TASK [debug] *******************************************************************
ok: [f5] => {
"msg": {
"message": "Ansible Please Block Some IPs",
"payload": "61.159.83.27, 106.31.225.181, 124.113.69.146, 110.193.169.10, 36.105.233.171, 36.117.197.225, 113.91.81.178, 115.207.239.18, 110.252.60.154, 117.42.208.29, 121.227.208.31, 121.227.153.3, 46.250.37.60, 118.224.199.107, 118.89.240.8, 36.101.190.239, 80.250.71.98, 58.38.47.241, 122.76.41.113, 59.108.107.170, "
}
}
TASK [Create Array from BlockedIPs] ********************************************
fatal: [f5]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'split'. 'dict object' has no attribute 'split'\n\nThe error appears to be in '/tmp/run_playbookcbp6leub/project/block-ips.yaml': line 32, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Create Array from BlockedIPs\n ^ here\n"}
PLAY RECAP *********************************************************************
f5 : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
2023-05-17 15:45:03,248 - ansible_rulebook.rule_set_runner - INFO - Task action::run_playbook::Listen for events on a webhook::Say Hello finished, active actions 0
i would have expected the payload with different ips than the first payload. i didnt expect the payload to be the entire post.