Skip to content

Commit

Permalink
Updated to ansible-mdd release 1.2.0 (#91)
Browse files Browse the repository at this point in the history
* Support for updating both OC and native config data in NSO
* Data harvesting of both OC and native config data using the ciscops.mdd.harvest playbook
  • Loading branch information
jasonking3 authored Mar 16, 2023
1 parent b052efc commit d41a01b
Show file tree
Hide file tree
Showing 39 changed files with 2,823 additions and 2,777 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
name: Build Environment
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'inventory/**.yml'
- 'inventory/**.yaml'
# pull_request:
# branches:
# - main
# paths:
# - 'inventory/**.yml'
# - 'inventory/**.yaml'

env:
CML_PASSWORD: ${{ secrets.CML_PASSWORD }}
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Validate Data
run: ansible-playbook ciscops.mdd.validate
- name: Push Data
run: ansible-playbook ciscops.mdd.nso_update_oc -e dry_run=no
run: ansible-playbook ciscops.mdd.update -e dry_run=no
- name: Sleep to let the network settle
run: sleep 60s
shell: bash
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
paths:
- 'mdd-data/**.yml'
- 'mdd-data/**.yaml'
- 'requirements.txt'
- 'requirements.yml'

env:
CML_PASSWORD: ${{ secrets.CML_PASSWORD }}
Expand All @@ -26,6 +28,10 @@ jobs:
steps:
- name: Checkout Inventory
uses: actions/checkout@v2
- name: Install Python Requirements
run: pip install -r requirements.txt
- name: Install Ansible Collections
run: ansible-galaxy collection install -r requirements.yml
- name: Run YAMLLINT
run: yamllint mdd-data
- name: Save Rollback
Expand All @@ -35,7 +41,7 @@ jobs:
- name: Update Devices
run: ansible-playbook ciscops.mdd.nso_update_devices
- name: Deploy Changes
run: ansible-playbook ciscops.mdd.nso_update_oc -e dry_run=no
run: ansible-playbook ciscops.mdd.update -e dry_run=no
- name: Run Checks
run: ansible-playbook ciscops.mdd.check
- name: Load Rollback
Expand Down
9 changes: 0 additions & 9 deletions group_vars/all/local.yml

This file was deleted.

9 changes: 7 additions & 2 deletions inventory/group_vars/all/mdd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@
# The data directory for the particular device
# mdd_device_dir: >-
# {{ mdd_data_root }}/{{ mdd_dir_items | join('/') }}
# The file pattern for files that specify OD Data
# mdd_oc_patterns:
# The file pattern for files that specify MDD Data
# mdd_data_patterns:
# - 'oc-*.yml'
# - 'config-*.yml'
# The data types that MDD will operate on
mdd_data_types:
- oc
# - config
# The file pattern for files that specify state checks
mdd_check_patterns:
- 'check-*.yml'
Expand Down
9 changes: 5 additions & 4 deletions mdd-data/org/oc-banner.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
mdd_data:
openconfig-system:system:
openconfig-system:config:
openconfig-system:login-banner: "Unauthorized access is prohibited!"
openconfig-system:motd-banner: "Welcome to {{ inventory_hostname }}"
mdd:openconfig:
openconfig-system:system:
openconfig-system:config:
openconfig-system:login-banner: "Unauthorized access is prohibited!"
openconfig-system:motd-banner: "Welcome to {{ inventory_hostname }}"
39 changes: 20 additions & 19 deletions mdd-data/org/oc-ntp.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
---
mdd_data:
openconfig-system:system:
openconfig-system:clock:
openconfig-system:config:
openconfig-system:timezone-name: 'PST -8 0'
openconfig-system:ntp:
openconfig-system:config:
openconfig-system:enabled: true
openconfig-system:servers:
openconfig-system:server:
- openconfig-system:address: '216.239.35.0'
openconfig-system:config:
openconfig-system:address: '216.239.35.0'
openconfig-system:association-type: SERVER
openconfig-system:iburst: true
- openconfig-system:address: '216.239.35.4'
openconfig-system:config:
openconfig-system:address: '216.239.35.4'
openconfig-system:association-type: SERVER
openconfig-system:iburst: true
mdd:openconfig:
openconfig-system:system:
openconfig-system:clock:
openconfig-system:config:
openconfig-system:timezone-name: 'PST -8 0'
openconfig-system:ntp:
openconfig-system:config:
openconfig-system:enabled: true
openconfig-system:servers:
openconfig-system:server:
- openconfig-system:address: '216.239.35.0'
openconfig-system:config:
openconfig-system:address: '216.239.35.0'
openconfig-system:association-type: SERVER
openconfig-system:iburst: true
- openconfig-system:address: '216.239.35.4'
openconfig-system:config:
openconfig-system:address: '216.239.35.4'
openconfig-system:association-type: SERVER
openconfig-system:iburst: true
Loading

0 comments on commit d41a01b

Please sign in to comment.