community.network.slxos_config – Manage Extreme Networks SLX-OS 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.slxos_config
.
Synopsis¶
Extreme SLX-OS configurations use a simple block indent file syntax for segmenting configuration into sections. This module provides an implementation for working with SLX-OS configuration sections in a deterministic way.
Parameters¶
Examples¶
- name: Configure top level configuration
community.network.slxos_config:
lines: hostname {{ inventory_hostname }}
- name: Configure interface settings
community.network.slxos_config:
lines:
- description test interface
- ip address 172.31.1.1/24
parents: interface Ethernet 0/1
- name: Configure multiple interfaces
community.network.slxos_config:
lines:
- lacp timeout long
parents: "{{ item }}"
with_items:
- interface Ethernet 0/1
- interface Ethernet 0/2
- name: Load new acl into device
community.network.slxos_config:
lines:
- seq 10 permit ip host 1.1.1.1 any log
- seq 20 permit ip host 2.2.2.2 any log
- seq 30 permit ip host 3.3.3.3 any log
- seq 40 permit ip host 4.4.4.4 any log
- seq 50 permit ip host 5.5.5.5 any log
parents: ip access-list extended test
before: no ip access-list extended test
match: exact
- name: Check the running-config against master config
community.network.slxos_config:
diff_against: intended
intended_config: "{{ lookup('file', 'master.cfg') }}"
- name: Check the startup-config against the running-config
community.network.slxos_config:
diff_against: startup
diff_ignore_lines:
- ntp clock .*
- name: Save running to startup when modified
community.network.slxos_config:
save_when: modified
- name: Configurable backup path
community.network.slxos_config:
lines: hostname {{ inventory_hostname }}
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¶
Lindsay Hill (@LindsayHill)