ansible/test/legacy/roles/cnos_rollback/tasks/main.yml
Matt Clay 781fd7099a Reorganize integration tests:
- Move legacy tests into a separate directory.
- Reduce common dependencies between targets.
2017-09-14 07:14:30 -07:00

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]['username']}} password={{ hostvars[inventory_hostname]['password']}} 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']}} 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]['username']}} password={{ hostvars[inventory_hostname]['password']}} 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']}} 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]['username']}} password={{ hostvars[inventory_hostname]['password']}} 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]['username']}} password={{ hostvars[inventory_hostname]['password']}} 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