cnos_config – Manage Lenovo CNOS configuration sections¶
New in version 2.6.
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
cnos_config:
"lines: hostname {{ inventory_hostname }}"
- name: configure interface settings
cnos_config:
lines:
- enable
- ip ospf enable
parents: interface ip 13
- name: load a config from disk and replace the current config
cnos_config:
src: config.cfg
backup: yes
- name: configurable backup path
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:
Key | Returned | Description |
---|---|---|
backup_path
string
|
when backup is yes |
The full path to the backup file
Sample:
/playbooks/ansible/backup/[email protected]:28:34
|
updates
list
|
Only when lines is specified. |
The set of commands that will be pushed to the remote device
Sample:
['...', '...']
|
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Anil Kumar Muraleedharan (@amuraleedhar)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.