mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
4b2495a54c
* Integration test suit for cnos_facts, cnos_config, cnos_command, enos_facts, enos_config and enos_command. * Update all_facts.yaml * Update invalid_subset.yaml * Update not_hardware.yaml * Adding cnos_backup, cnos_bgp, cnos_conditional_command, cnos_condtional_template, cnos_ethernet, cnos_portchannel, cnos_rollback. * Update README.md * Adding the sample roles for cnos_save, cnos_show_run, cnos_template, cnos_vlag and cnos_vlan
25 lines
2.5 KiB
YAML
25 lines
2.5 KiB
YAML
# This contain sample config Roll Back execution tasks
|
|
---
|
|
|
|
- name: Test Rollback of config - Running config
|
|
cnos_rollback: host={{ inventory_hostname }} username={{ hostvars[inventory_hostname]['ansible_ssh_user']}} password={{ hostvars[inventory_hostname]['ansible_ssh_pass']}} deviceType={{ hostvars[inventory_hostname]['deviceType']}} outputfile=./results/cnos_rollback_{{ inventory_hostname }}_output.txt configType='{{item.configType}}' protocol='{{item.protocol}}' serverip='{{item.serverip}}' rcpath='{{item.rcpath}}' serverusername='{{item.serverusername}}' serverpassword='{{item.serverpassword}}'
|
|
with_items: "{{test_rollback_data1}}"
|
|
|
|
- name: Test Rollback of config - Startup config
|
|
cnos_rollback: host={{ inventory_hostname }} username={{ hostvars[inventory_hostname]['ansible_ssh_user']}} password={{ hostvars[inventory_hostname]['ansible_ssh_pass']}} deviceType={{ hostvars[inventory_hostname]['deviceType']}} outputfile=./results/cnos_rollback_{{ inventory_hostname }}_output.txt configType='{{item.configType}}' protocol='{{item.protocol}}' serverip='{{item.serverip}}' rcpath='{{item.rcpath}}' serverusername='{{item.serverusername}}' serverpassword='{{item.serverpassword}}'
|
|
with_items: "{{test_rollback_data2}}"
|
|
|
|
#Root folder will be different for SFTP/SCP and TFTP
|
|
#The following task is commented.
|
|
#Before trying this, please change in /etc/ansible/hosts file
|
|
#and place an config file with reference to your tftp-root folder
|
|
|
|
#- name: Test Rollback of config - Running config - TFTP
|
|
# cnos_rollback: host={{ inventory_hostname }} username={{ hostvars[inventory_hostname]['ansible_ssh_user']}} password={{ hostvars[inventory_hostname]['ansible_ssh_pass']}} deviceType={{ hostvars[inventory_hostname]['deviceType']}} outputfile=./results/cnos_rollback_{{ inventory_hostname }}_output.txt configType='{{item.configType}}' protocol='{{item.protocol}}' serverip='{{item.serverip}}' rcpath={{ hostvars[inventory_hostname]['rcpath']}}
|
|
# with_items: "{{test_rollback_data3}}"
|
|
|
|
#- name: Test Rollback of config - Startup config - TFTP
|
|
# cnos_rollback: host={{ inventory_hostname }} username={{ hostvars[inventory_hostname]['ansible_ssh_user']}} password={{ hostvars[inventory_hostname]['ansible_ssh_pass']}} deviceType={{ hostvars[inventory_hostname]['deviceType']}} outputfile=./results/cnos_rollback_{{ inventory_hostname }}_output.txt configType='{{item.configType}}' protocol='{{item.protocol}}' serverip='{{item.serverip}}' rcpath={{ hostvars[inventory_hostname]['rcpath']}}
|
|
# with_items: "{{test_rollback_data4}}"
|
|
|
|
# Completed file
|