community.network.sros_config – Manage Nokia SR OS device configuration¶
Note
This plugin is part of the community.network collection (version 1.3.2).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.sros_config
.
Synopsis¶
Nokia SR OS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with SR OS configuration sections in a deterministic way.
Parameters¶
Notes¶
Note
For more information on using Ansible to manage Nokia SR OS Network devices see https://www.ansible.com/ansible-nokia.
Examples¶
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
---
vars:
cli:
host: "{{ inventory_hostname }}"
username: admin
password: admin
transport: cli
---
- name: Enable rollback location
community.network.sros_config:
lines: configure system rollback rollback-location "cf3:/ansible"
provider: "{{ cli }}"
- name: Set system name to {{ inventory_hostname }} using one line
community.network.sros_config:
lines:
- configure system name "{{ inventory_hostname }}"
provider: "{{ cli }}"
- name: Set system name to {{ inventory_hostname }} using parents
community.network.sros_config:
lines:
- 'name "{{ inventory_hostname }}"'
parents:
- configure
- system
provider: "{{ cli }}"
backup: yes
- name: Load config from file
community.network.sros_config:
src: "{{ inventory_hostname }}.cfg"
provider: "{{ cli }}"
save: yes
- name: Invalid use of lines
community.network.sros_config:
lines:
- service
- vpls 1000 customer foo 1 create
- description "invalid lines example"
provider: "{{ cli }}"
- name: Valid use of lines
community.network.sros_config:
lines:
- description "invalid lines example"
parents:
- service
- vpls 1000 customer foo 1 create
provider: "{{ cli }}"
- name: Configurable backup path
community.network.sros_config:
backup: yes
backup_options:
filename: backup.cfg
dir_path: /home/user
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Peter Sprygada (@privateip)