This file contains 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 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 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 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 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 |
This file contains 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: no | |
tasks: | |
- name: Deleted | |
cisco.nxos.nxos_ospfv2: | |
state: deleted | |
tags: | |
- deleted |
This file contains 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
from itertools import chain | |
def sort_list(val): | |
if isinstance(val, list): | |
return sorted(val) | |
return val | |
def dict_merge(base, other): | |
""" Return a new dict object that combines base and other |
This file contains 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
Config: | |
============ | |
Nexus9000v# sh running-config | section '^router ospf .*' | |
router ospf 100 | |
router-id 192.0.2.100 | |
area 0.0.0.100 nssa no-summary no-redistribution | |
max-metric router-lsa external-lsa summary-lsa 120 | |
area 0.0.0.101 range 10.0.2.0/24 not-advertise | |
area 0.0.0.101 range 10.0.3.0/24 cost 255 |
This file contains 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
[iosxr] | |
xrv-9k-612 ansible_host=127.0.0.1 ansible_ssh_port=2202 ansible_user=vagrant ansible_ssh_pass=vagrant | |
xrv-9k-662-1 | |
xrv-9k-701-1 | |
xrv-9k-613 ansible_host=iosxr-02 ansible_user=ansible ansible_ssh_pass=ansible | |
[asa] | |
asav-rdo | |
[eos] |
This file contains 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
Directory Structure | |
===================== | |
ansible-collections: | |
-> play.yml | |
-> ansible.cfg | |
-> collections | |
-> ansible_collections | |
-> ansible | |
-> netcommon | |
-> cisco |