This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Report incident to ServiceNow | |
| hosts: clus-mdt-leaf1 | |
| sources: | |
| - ansible.eda.kafka: | |
| host: 172.22.225.11 | |
| topic: eda | |
| port: 9092 | |
| rules: | |
| - name: Check route count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: nxos | |
| gather_facts: false | |
| tasks: | |
| - ansible.builtin.debug: | |
| msg: "### start gathering information to report detected event ###" | |
| - name: "Gather NX-OS version information from affected host" | |
| cisco.nxos.nxos_command: | |
| commands: show version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clusadmin@clus-mdt-svr02:~/playbooks$ cat report_event.yaml | |
| --- | |
| - hosts: clus-mdt-leaf1 | |
| gather_facts: false | |
| tasks: | |
| - ansible.builtin.debug: | |
| msg: "### start gathering information to report detected event ###" | |
| - name: "Gather NX-OS version information from affected host" | |
| cisco.nxos.nxos_command: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| module: demo_interfaces | |
| version_added: 1.0.0 | |
| short_description: 'Manages interface attributes of MyOS Interfaces' | |
| description: This module manages the interface attributes of MyOS interfaces. | |
| authors: Ansible Network Team | |
| notes: | |
| - Tested against MyOS 1.0.0 | |
| options: | |
| config: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Parse externally provided route-maps configuration | |
| cisco.nxos.nxos_route_maps: | |
| running_config: | | |
| route-map rmap1 permit 10 | |
| match as-number 65564 | |
| match as-path Allow40 | |
| match ip address acl_1 | |
| description rmap1-10-permit | |
| route-map rmap1 deny 20 | |
| match community BGPCommunity1 BGPCommunity2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # (c) 2020 Ansible Project | |
| # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
| from __future__ import absolute_import, division, print_function | |
| __metaclass__ = type | |
| import os | |
| from ansible.playbook.task import Task |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/plugins/httpapi/nxos.py b/plugins/httpapi/nxos.py | |
| index 01ebc0e..62d0834 100644 | |
| --- a/plugins/httpapi/nxos.py | |
| +++ b/plugins/httpapi/nxos.py | |
| @@ -16,7 +16,7 @@ description: | |
| version_added: "2.6" | |
| """ | |
| -import json | |
| +import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: nxos | |
| gather_facts: yes | |
| vars: | |
| ansible_facts_modules: cisco.nxos.nxos_facts | |
| tasks: | |
| - debug: var=ansible_facts |