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: test seassclrt001 | |
ios_config: | |
host: "{{ inventory_hostname }}" | |
before: ['no ip access-list standard test'] | |
parents: ['ip access-list standard test'] | |
lines: | |
- permit 1.1.1.1 | |
- permit 1.1.1.2 | |
- permit 1.1.1.3 |
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
#1:49 | |
diagram: | |
fill: "#3d3935" | |
columns: 5 | |
rows: 5 | |
gridLines: false | |
title: | |
color: lightgrey | |
heightPercentage: 6 | |
logoFill: lightgrey |
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
diagram: | |
fill: "white" | |
rows: 6 | |
columns: 6 | |
gridLines: true | |
title: | |
color: black | |
fill: none | |
logoFill: white | |
logoUrl: "https://upload.wikimedia.org/wikipedia/commons/9/91/Octicons-mark-github.svg" |
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 ansible/ansible:ubuntu1604 | |
# Some basic useful utilities not related to Ansible | |
RUN apt-get update && apt-get -y install vim wget cowsay | |
# Install govc, used for vsphere VM spinup | |
RUN curl -L -O https://github.com/vmware/govmomi/releases/download/v0.11.1/govc_linux_amd64.gz &&\ | |
gunzip govc_linux_amd64.gz &&\ | |
mv govc_linux_amd64 /usr/local/bin/govc &&\ | |
chmod +x /usr/local/bin/govc |
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
// Int64.js | |
// | |
// Copyright (c) 2012 Robert Kieffer | |
// MIT License - http://opensource.org/licenses/mit-license.php | |
/** | |
* Support for handling 64-bit int numbers in Javascript (node.js) | |
* | |
* JS Numbers are IEEE-754 binary double-precision floats, which limits the | |
* range of values that can be represented with integer precision to: |
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
""" ntpq out parser and reporter | |
""" | |
import re | |
import socket | |
# pylint: disable=redefined-builtin | |
from ansible.module_utils.basic import AnsibleModule | |
# - name: Run the ntp health module against the out from the ntp status command | |
# ntp_health: | |
# output: "{{ output['stdout'][0] }}" # the output of 'show ntp associations or show ntp peer-status' |
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
{# ############################################## fail if add, no longer supported #} | |
{% if 'add' in interface['value']['switchport']['trunk']['allowed_vlans'] %} | |
{{ you_cant_use_the_add_statement_anymore }} | |
{% endif %} | |
{# ############################################## remediate the trunk list #} | |
{% set trunk_vlan_changes = configuration_prechange['matches']['sections'][0]['section_content']|trunk_vlan_remediate(interface['value']['switchport']['trunk']['allowed_vlans']['vlans'],20) %} | |
{% if 'vlans' in trunk_vlan_changes and trunk_vlan_changes['vlans'] %} | |
{% set _ = desired.append("switchport trunk allowed vlan %s" % (trunk_vlan_changes['vlans'])) %} | |
{% endif %}{# vlans #} | |
{% for entry in trunk_vlan_changes['vlans_add'] %} |
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
#!/usr/bin/env python | |
import argparse | |
from ansible.parsing.dataloader import DataLoader | |
from ansible.vars.manager import VariableManager | |
from ansible.inventory.manager import InventoryManager | |
from cbkutils.utils import ppc | |
def collect(args): | |
""" Collect vars for a device | |
""" |
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
""" fleet prototype | |
""" | |
import os | |
import multiprocessing.pool | |
from netmiko.ssh_autodetect import SSHDetect | |
from netmiko.ssh_dispatcher import ConnectHandler | |
class Configuration(): #pylint: disable=R0903 | |
""" A class for a configuration | |
""" |
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
import re | |
import python_jsonschema_objects as pjs | |
model = { | |
"title": "lldp", | |
"type": "object", | |
"properties": { | |
"neighbors": { | |
"type": "object", | |
"patternProperties": { |
OlderNewer