community.network.cnos_config – Manage Lenovo CNOS configuration sections¶
Note
This plugin is part of the community.network collection (version 2.1.1).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.cnos_config
.
Synopsis¶
Lenovo CNOS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with CNOS configuration sections in a deterministic way.
Parameters¶
Examples¶
Tasks: The following are examples of using the module cnos_config.
---
- name: Configure top level configuration
community.network.cnos_config:
"lines: hostname {{ inventory_hostname }}"
- name: Configure interface settings
community.network.cnos_config:
lines:
- enable
- ip ospf enable
parents: interface ip 13
- name: Load a config from disk and replace the current config
community.network.cnos_config:
src: config.cfg
backup: yes
- name: Configurable backup path
community.network.cnos_config:
src: config.cfg
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¶
Anil Kumar Muraleedharan (@amuraleedhar)