From 261afdabcb1e36168defe0b238427d73f9a5f6c5 Mon Sep 17 00:00:00 2001 From: willtome Date: Thu, 18 Aug 2022 16:04:29 -0400 Subject: [PATCH 1/6] network demos --- linux/setup.yml | 2 +- network/README.md | 9 +++++++ network/setup.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 network/README.md create mode 100644 network/setup.yml diff --git a/linux/setup.yml b/linux/setup.yml index 6a9ca77..1f4bf2b 100644 --- a/linux/setup.yml +++ b/linux/setup.yml @@ -1,5 +1,5 @@ --- -user_message: | +user_message: - Be sure to update the 'activation_key' and 'org_id' extra variables for 'LINUX / Register'. https://access.redhat.com/management/activation_keys - Update Credential for Insights Inventory with Red Hat account. - Add variables for system_roles. https://console.redhat.com/ansible/automation-hub/repo/published/redhat/rhel_system_roles diff --git a/network/README.md b/network/README.md new file mode 100644 index 0000000..ca97db3 --- /dev/null +++ b/network/README.md @@ -0,0 +1,9 @@ +# Network Demos + +## Table of Contents +- [Network Demos](#network-demos) + - [Table of Contents](#table-of-contents) + - [About These Demos](#about-these-demos) + +## About These Demos +This category of demos shows examples of network operations and management with Ansible Automation Platform. diff --git a/network/setup.yml b/network/setup.yml new file mode 100644 index 0000000..0db0ec4 --- /dev/null +++ b/network/setup.yml @@ -0,0 +1,61 @@ +--- +user_message: + +controller_components: + - organizations + - projects + - inventory + - inventory_sources + - job_templates + +controller_organizations: + - name: Networking + +controller_projects: + - name: Network Golden Configs + organization: Networking + scm_type: git + scm_url: https://github.com/nleiva/ansible-net-modules + update_project: yes + wait: yes + +controller_inventories: + - name: Network Inventory + organization: Networking + +controller_inventory_sources: + - name: DevNet always-on sandboxes + source: scm + inventory: Network Inventory + overwrite: true + source_project: Network Golden Configs + source_path: hosts + +controller_templates: + - name: NETWORK / Configuration + organization: Networking + inventory: Network Inventory + survey_enabled: true + project: Network Golden Configs + playbook: main.yml + ask_limit_on_launch: true + survey: + name: '' + description: '' + spec: + - question_name: What resource would you like to configure? + type: multiplechoice + variable: rm + required: true + choices: + - acls + - banner + - bgp_global + - hostname + - l3_interface + - logging + - ntp + - ospfv2 + - prefix_lists + - snmp + - user From 4f08e90d6bc2d0192b044a441c8cce98d9228478 Mon Sep 17 00:00:00 2001 From: willtome Date: Thu, 18 Aug 2022 16:10:25 -0400 Subject: [PATCH 2/6] change role name --- network/setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/setup.yml b/network/setup.yml index 0db0ec4..536dc80 100644 --- a/network/setup.yml +++ b/network/setup.yml @@ -4,7 +4,7 @@ user_message: controller_components: - organizations - projects - - inventory + - inventories - inventory_sources - job_templates From 5f643fc3a111c5a294e4cc65b80be02631c2ab33 Mon Sep 17 00:00:00 2001 From: willtome Date: Thu, 18 Aug 2022 16:22:09 -0400 Subject: [PATCH 3/6] source update --- network/setup.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/network/setup.yml b/network/setup.yml index 536dc80..4b2e529 100644 --- a/network/setup.yml +++ b/network/setup.yml @@ -6,6 +6,7 @@ controller_components: - projects - inventories - inventory_sources + - inventory_source_update - job_templates controller_organizations: From 26c225f4e05b7790a826103f0a6ac86273d5fd29 Mon Sep 17 00:00:00 2001 From: willtome Date: Fri, 19 Aug 2022 11:21:59 -0400 Subject: [PATCH 4/6] add hub creds --- network/setup.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/network/setup.yml b/network/setup.yml index 4b2e529..f2c2cc6 100644 --- a/network/setup.yml +++ b/network/setup.yml @@ -11,6 +11,9 @@ controller_components: controller_organizations: - name: Networking + galaxy_credentials: + - Automation Hub + - Ansible Galaxy controller_projects: - name: Network Golden Configs @@ -40,6 +43,7 @@ controller_templates: project: Network Golden Configs playbook: main.yml ask_limit_on_launch: true + use_fact_cache: yes survey: name: '' description: '' From 4368a1ad93cf5c80c57f8d6a17dc860bfc033286 Mon Sep 17 00:00:00 2001 From: willtome Date: Fri, 19 Aug 2022 12:13:14 -0400 Subject: [PATCH 5/6] add readme --- network/README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/network/README.md b/network/README.md index ca97db3..3f2406f 100644 --- a/network/README.md +++ b/network/README.md @@ -4,6 +4,35 @@ - [Network Demos](#network-demos) - [Table of Contents](#table-of-contents) - [About These Demos](#about-these-demos) + - [Project](#project) + - [Inventory](#inventory) + - [Suggested Usage](#suggested-usage) ## About These Demos -This category of demos shows examples of network operations and management with Ansible Automation Platform. +This category of demos shows examples of network operations and management with Ansible Automation Platform. The list of demos can be found below. See the [Suggested Usage](#suggested-usage) section of this document for recommendations on how to best use these demos. +- [**NETWORK / Configuration**](https://github.com/nleiva/ansible-net-modules/blob/main/main.yml) - Deploy golden configurations for different resources to Cisco IOS, IOSXR, and NXOS. + +### Project + +These demos leverage playbooks from a [git repo](https://github.com/nleiva/ansible-net-modules) that is added as the **`Network Golden Configs`** Project in your Ansible Controller. Review this repo for the playbooks to configure different resources and network config templates that will be configured. + +### Inventory + +These demos leverage "always-on" instances for Cisco IOS, IOSXR, and NXOS from [Cisco DevNet Sandboxes](https://developer.cisco.com/docs/sandbox/#!getting-started/always-on-sandboxes). These instances are shared and do not provide admin access but they are instantly avaible all the time meaning not setup time is required. + +A **`Network Inventory`** is created when setting up these demos and a dynamic source is added to populate the Always-On instances. Review the inventory file [here](https://github.com/nleiva/ansible-net-modules/blob/main/hosts). + +## Suggested Usage + +**NETWORK / Configuration** - Use this job to execute different [Ansible Network Resource Modules](https://docs.ansible.com/ansible/latest/network/user_guide/network_resource_modules.html) to deploy golden configs. Below is a list of the different resources the can be configured with a link to their golden config. + - [acls](https://github.com/nleiva/ansible-net-modules/blob/main/acls.cfg) + - [banner](https://github.com/nleiva/ansible-net-modules/blob/main/banner.cfg) + - [bgp_global](https://github.com/nleiva/ansible-net-modules/blob/main/bgp_global.cfg) + - [hostname](https://github.com/nleiva/ansible-net-modules/blob/main/hostname.cfg) + - [l3_interface](https://github.com/nleiva/ansible-net-modules/blob/main/l3_interface.cfg) + - [logging](https://github.com/nleiva/ansible-net-modules/blob/main/logging.cfg) + - [ntp](https://github.com/nleiva/ansible-net-modules/blob/main/ntp.cfg) + - [ospfv2](https://github.com/nleiva/ansible-net-modules/blob/main/ospfv2.cfg) + - [prefix_lists](https://github.com/nleiva/ansible-net-modules/blob/main/prefix_lists.cfg) + - [snmp](https://github.com/nleiva/ansible-net-modules/blob/main/snmp.cfg) + - [user](https://github.com/nleiva/ansible-net-modules/blob/main/user.cfg) From 3e2606c9f4dd2b496982e66cff8b59ec35a911fb Mon Sep 17 00:00:00 2001 From: willtome Date: Fri, 19 Aug 2022 13:18:21 -0400 Subject: [PATCH 6/6] add main readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b6d08c4..665c9da 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ This is a centralized location for all Ansible Product Demos going forward. | [Linux](linux/README.md) | Repository of demos for RHEL and Linux automation | | [Windows](windows/README.md) | Repository of demos for Windows Server automation | | [Cloud](cloud/README.md) | Demo for infrastructure and cloud provisioning automation | +| [Network](network/README.md) | Ansible Network automation demos | ## Contributions @@ -35,4 +36,4 @@ If you would like to contribute to this project please refer to [contribution gu - Name: Controller Credential - Extra vars: - demo: + demo: