Skip to content

Instantly share code, notes, and snippets.

@NilashishC
Created May 22, 2023 13:32
Show Gist options
  • Save NilashishC/73223adf469f2970c828bb2133ff5ab3 to your computer and use it in GitHub Desktop.
Save NilashishC/73223adf469f2970c828bb2133ff5ab3 to your computer and use it in GitHub Desktop.
2023-05-22 19:00:03,530 - ansible_rulebook.app - INFO - Starting sources
2023-05-22 19:00:03,530 - ansible_rulebook.app - INFO - Starting rules
2023-05-22 19:00:03,530 - ansible_rulebook.engine - INFO - run_ruleset
2023-05-22 19:00:03,530 - drools.ruleset - INFO - Using jar: /home/nchakrab/.virtualenvs/core/lib/python3.9/site-packages/drools/jars/drools-ansible-rulebook-integration-runtime-1.0.1-SNAPSHOT.jar
2023-05-22 19:00:03 974 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.AbstractRulesEvaluator - Start automatic pseudo clock with a tick every 100 milliseconds
2023-05-22 19:00:03 985 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.AbstractRulesEvaluator - Start automatic pseudo clock with a tick every 100 milliseconds
2023-05-22 19:00:03,985 - ansible_rulebook.engine - INFO - ruleset define: {"name": "Ruleset-1", "hosts": ["localhost"], "sources": [{"EventSource": {"name": "range", "source_name": "ansible.eda.range", "source_args": {"limit": 5}, "source_filters": []}}], "rules": [{"Rule": {"name": "condition-1", "condition": {"AllCondition": [{"EqualsExpression": {"lhs": {"Event": "i"}, "rhs": {"Integer": 1}}}]}, "actions": [{"Action": {"action": "run_playbook", "action_args": {"name": "test_playbook.yaml", "set_facts": true, "ruleset": "Ruleset-2", "verbosity": 2}}}], "enabled": true}}]}
2023-05-22 19:00:03,986 - ansible_rulebook.engine - INFO - ruleset define: {"name": "Ruleset-2", "hosts": ["localhost"], "sources": [{"EventSource": {"name": "range", "source_name": "ansible.eda.range", "source_args": {"limit": 5}, "source_filters": []}}], "rules": [{"Rule": {"name": "condition-2", "condition": {"AllCondition": [{"EqualsExpression": {"lhs": {"Facts": "a_fact"}, "rhs": {"String": "This was set in playbook"}}}]}, "actions": [{"Action": {"action": "debug", "action_args": {"msg": "This is working"}}}], "enabled": true}}]}
2023-05-22 19:00:03,997 - ansible_rulebook.engine - INFO - load source
2023-05-22 19:00:04,454 - ansible_rulebook.engine - INFO - load source filters
2023-05-22 19:00:04,454 - ansible_rulebook.engine - INFO - loading eda.builtin.insert_meta_info
2023-05-22 19:00:04,904 - ansible_rulebook.engine - INFO - Calling main in ansible.eda.range
2023-05-22 19:00:04,904 - ansible_rulebook.engine - INFO - load source
2023-05-22 19:00:04,905 - ansible_rulebook.engine - INFO - load source filters
2023-05-22 19:00:04,905 - ansible_rulebook.engine - INFO - loading eda.builtin.insert_meta_info
2023-05-22 19:00:04,905 - ansible_rulebook.engine - INFO - Calling main in ansible.eda.range
2023-05-22 19:00:04,906 - ansible_rulebook.engine - INFO - Waiting for all ruleset tasks to end
2023-05-22 19:00:04,906 - ansible_rulebook.rule_set_runner - INFO - Waiting for actions on events from Ruleset-1
2023-05-22 19:00:04,906 - ansible_rulebook.rule_set_runner - INFO - Waiting for events, ruleset: Ruleset-1
2023-05-22 19:00:04 907 [drools-async-evaluator-thread] INFO org.drools.ansible.rulebook.integration.api.io.RuleExecutorChannel - Async channel connected
2023-05-22 19:00:04,916 - ansible_rulebook.rule_set_runner - INFO - Waiting for actions on events from Ruleset-2
2023-05-22 19:00:04,916 - ansible_rulebook.rule_set_runner - INFO - Waiting for events, ruleset: Ruleset-2
2023-05-22 19:00:04 933 [main] INFO org.drools.ansible.rulebook.integration.api.rulesengine.RegisterOnlyAgendaFilter - Activation of effective rule "condition-1" with facts: {m={meta={received_at=2023-05-22T13:30:04.905979Z, source={name=range, type=ansible.eda.range}, uuid=c50e2211-3f0f-49f2-9f35-dd2d8f045277}, i=1}}
2023-05-22 19:00:04,937 - ansible_rulebook.rule_generator - INFO - calling condition-1
2023-05-22 19:00:04,940 - ansible_rulebook.rule_set_runner - INFO - call_action run_playbook
2023-05-22 19:00:04,940 - ansible_rulebook.rule_set_runner - INFO - substitute_variables [{'name': 'test_playbook.yaml', 'set_facts': True, 'ruleset': 'Ruleset-2', 'verbosity': 2}] [{'event': {'meta': {'received_at': '2023-05-22T13:30:04.905979Z', 'source': {'name': 'range', 'type': 'ansible.eda.range'}, 'uuid': 'c50e2211-3f0f-49f2-9f35-dd2d8f045277'}, 'i': 1}}]
2023-05-22 19:00:04,940 - ansible_rulebook.rule_set_runner - INFO - action args: {'name': 'test_playbook.yaml', 'set_facts': True, 'ruleset': 'Ruleset-2', 'verbosity': 2}
2023-05-22 19:00:04,940 - ansible_rulebook.builtin - INFO - running Ansible playbook: test_playbook.yaml
2023-05-22 19:00:04,941 - ansible_rulebook.builtin - INFO - ruleset: Ruleset-1, rule: condition-1
2023-05-22 19:00:04,941 - ansible_rulebook.builtin - INFO - Calling Ansible runner
2023-05-22 19:00:04,944 - ansible_rulebook.engine - INFO - Broadcast shutdown to all source plugins
2023-05-22 19:00:04,948 - ansible_rulebook.engine - INFO - Broadcast shutdown to all source plugins
2023-05-22 19:00:04,949 - ansible_rulebook.engine - INFO - Broadcast to queues: [<Queue at 0x7ff524ce1040 maxsize=1 _getters[1] tasks=5>, <Queue at 0x7ff52558a490 maxsize=1 _getters[1] tasks=5>]
2023-05-22 19:00:04,950 - ansible_rulebook.engine - INFO - Broadcasting shutdown: Shutdown(message='Source ansible.eda.range initiated shutdown at 2023-05-22 19:00:04.944278', delay=60.0, kind='graceful', source_plugin='ansible.eda.range')
2023-05-22 19:00:04,950 - ansible_rulebook.engine - INFO - Broadcast to queues: [<Queue at 0x7ff524ce1040 maxsize=1 _queue=[Shutdown(message='Source ansible.eda.range initiated shutdown at 2023-05-22 19:00:04.944278', delay=60.0, kind='graceful', source_plugin='ansible.eda.range')] tasks=6>, <Queue at 0x7ff52558a490 maxsize=1 _queue=[Shutdown(message='Source ansible.eda.range initiated shutdown at 2023-05-22 19:00:04.944278', delay=60.0, kind='graceful', source_plugin='ansible.eda.range')] tasks=6>]
2023-05-22 19:00:04,950 - ansible_rulebook.engine - INFO - Broadcasting shutdown: Shutdown(message='Source ansible.eda.range initiated shutdown at 2023-05-22 19:00:04.948776', delay=60.0, kind='graceful', source_plugin='ansible.eda.range')
2023-05-22 19:00:04,950 - ansible_rulebook.rule_set_runner - INFO - Ruleset: Ruleset-1, received shutdown: Shutdown(message='Source ansible.eda.range initiated shutdown at 2023-05-22 19:00:04.944278', delay=60.0, kind='graceful', source_plugin='ansible.eda.range')
2023-05-22 19:00:04,951 - ansible_rulebook.rule_set_runner - INFO - ruleset: Ruleset-1 waiting 60.000000 for shutdown
2023-05-22 19:00:04,951 - ansible_rulebook.rule_set_runner - INFO - Ruleset: Ruleset-2, received shutdown: Shutdown(message='Source ansible.eda.range initiated shutdown at 2023-05-22 19:00:04.944278', delay=60.0, kind='graceful', source_plugin='ansible.eda.range')
2023-05-22 19:00:04,951 - ansible_rulebook.rule_set_runner - INFO - ruleset: Ruleset-2 shutdown no pending work
2023-05-22 19:00:04,951 - ansible_rulebook.rule_set_runner - INFO - Cleaning up ruleset Ruleset-2
2023-05-22 19:00:04 954 [main] INFO org.drools.ansible.rulebook.integration.api.RulesExecutor - Disposing session with id: 2
2023-05-22 19:00:04,968 - ansible_rulebook.rule_set_runner - INFO - {'asyncResponses': 0,
'bytesSentOnAsync': 0,
'end': '2023-05-22T13:30:04.958384215Z',
'eventsMatched': 0,
'eventsProcessed': 5,
'eventsSuppressed': 5,
'numberOfDisabledRules': 0,
'numberOfRules': 1,
'permanentStorageSize': 0,
'ruleSetName': 'Ruleset-2',
'rulesTriggered': 0,
'sessionId': 2,
'start': '2023-05-22T13:30:03.985301702Z'}
ansible-playbook [core 2.14.5]
config file = None
configured module search path = ['/home/nchakrab/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/nchakrab/.virtualenvs/core/lib/python3.9/site-packages/ansible
ansible collection location = /home/nchakrab/.ansible/collections:/usr/share/ansible/collections
executable location = /home/nchakrab/.virtualenvs/core/bin/ansible-playbook
python version = 3.9.6 (default, Oct 26 2021, 12:15:23) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] (/home/nchakrab/.virtualenvs/core/bin/python)
jinja version = 3.1.2
libyaml = True
No config file found; using defaults
Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: test_playbook.yaml ***************************************************
1 plays in test_playbook.yaml
PLAY [localhost] ***************************************************************
TASK [ansible.builtin.set_fact] ************************************************
task path: /tmp/run_playbookr0x_wnxt/project/test_playbook.yaml:5
ok: [localhost] => {"ansible_facts": {"a_fact": "This was set in playbook"}, "changed": false}
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
2023-05-22 19:00:05,667 - ansible_rulebook.builtin - INFO - Ansible Runner Queue task cancelled
2023-05-22 19:00:05,670 - ansible_rulebook.builtin - INFO - Playbook rc: 0, status: successful
2023-05-22 19:00:05,671 - ansible_rulebook.rule_set_runner - INFO - Task action::run_playbook::Ruleset-1::condition-1 finished, active actions 0
2023-05-22 19:00:05,671 - ansible_rulebook.rule_set_runner - INFO - All actions done
2023-05-22 19:00:05,671 - ansible_rulebook.rule_set_runner - INFO - Cleaning up ruleset Ruleset-1
2023-05-22 19:00:05 672 [main] INFO org.drools.ansible.rulebook.integration.api.RulesExecutor - Disposing session with id: 1
2023-05-22 19:00:05,673 - ansible_rulebook.rule_set_runner - INFO - {'asyncResponses': 0,
'bytesSentOnAsync': 0,
'end': '2023-05-22T13:30:05.672511493Z',
'eventsMatched': 1,
'eventsProcessed': 5,
'eventsSuppressed': 4,
'numberOfDisabledRules': 0,
'numberOfRules': 1,
'permanentStorageSize': 0,
'ruleSetName': 'Ruleset-1',
'rulesTriggered': 1,
'sessionId': 1,
'start': '2023-05-22T13:30:03.970159623Z'}
2023-05-22 19:00:05,673 - ansible_rulebook.engine - INFO - Cancelling all ruleset tasks
2023-05-22 19:00:05,673 - ansible_rulebook.engine - INFO - Waiting on gather
2023-05-22 19:00:05,673 - ansible_rulebook.engine - INFO - Returning from run_rulesets
2023-05-22 19:00:05,673 - ansible_rulebook.app - INFO - Cancelling event source tasks
2023-05-22 19:00:05,676 - ansible_rulebook.app - INFO - Main complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment