The deploy
role will read the OSPF facts from the provided/default or remote inventory and deploy the changes onto the appliances. It enables users to read the config as host_vars
from a local or remote data store and deploy network configurations if any changes are found. This role is designed to ensure that network configurations remain consistent and compliant across devices.
- Read network configuration data from local or remote repositories.
- Deploy configurations only when changes are detected.
- Support for integration with Git repositories for version control.
Variable Name | Default Value | Required | Type | Description | Example |
---|---|---|---|---|---|
ansible_network_os |
"" |
no | str | Network OS to be used during deploy. | "cisco.nxos.nxos" |
data_store |
"" |
yes | dict | Defines the source of the configurations (local or remote). | See usage example below. |
Below is an example playbook demonstrating how to use the deploy
role, where we will retrieve config from mentioned gh_scm_path and deploy on
to the network.
---
- name: Deploy network configurations
hosts: all
gather_facts: true
tasks:
- name: Include deploy role
ansible.builtin.include_role:
name: network.ospf.deploy
vars:
data_store:
scm:
origin:
url: "{{ gh_scm_path }}"
token: "{{ gh_token }}"
user:
name: "{{ gh_username }}"
email: "{{ gh_user_email }}"
Example Output When the playbook is executed successfully, the output will show the configurations being deployed when output verbosity is debug mode.
GNU General Public License v3.0 or later. See LICENSE to see the full text.
- Ansible Network Content Team