Skip to content

Instantly share code, notes, and snippets.

View NilashishC's full-sized avatar
🎯
Focusing

Nilashish Chakraborty NilashishC

🎯
Focusing
View GitHub Profile
05-29T08:08:23.783033+00:00 DEBUG 'ansible_navigator.actions.back.run' Stepping back in images from images to image_menu
2023-05-29T08:08:24.141869+00:00 DEBUG 'ansible_navigator.actions.back.run' back requested
2023-05-29T08:08:24.142658+00:00 DEBUG 'ansible_navigator.actions.back.run' Stepping back in images from image_menu to images
2023-05-29T08:08:24.541434+00:00 DEBUG 'ansible_navigator.actions.back.run' back requested
2023-05-29T08:08:24.542123+00:00 DEBUG 'ansible_navigator.actions.back.run' Return to images, at last step
2023-05-29T08:08:24.568157+00:00 DEBUG 'ansible_navigator.runner.base.__del__' delete temporary ansible-runner private_data_dir at path /tmp/ansible-navigator_fuicp8b3
(navigator) ➜ ~ rm -rf logs
(navigator) ➜ ~ cat logs/ansible-navigator.log
cat: logs/ansible-navigator.log: No such file or directory
(navigator) ➜ ~ ansible-navigator images
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":
---
- 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
---
- 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
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:
---
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:
- 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
# (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
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
---
- hosts: nxos
gather_facts: yes
vars:
ansible_facts_modules: cisco.nxos.nxos_facts
tasks:
- debug: var=ansible_facts