-
Notifications
You must be signed in to change notification settings - Fork 4
/
ise.cli_commands.yaml
58 lines (51 loc) · 1.73 KB
/
ise.cli_commands.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
- name: Test ISE CLI Commands
hosts: ise
gather_facts: no
# strategy: free # ['free','linear','serial']
vars_files:
- vars/main.yaml
vars:
cmd: show application status ise
commands:
- show udi
- show uptime
- show ports
- show inventory
- show clock
# - show running-config
# - show interface GigabitEthernet 0
# - show terminal
- show timezone
# - show timezones
# - show application status ise
# - show logging system ade/ADE.log # cannot use `tail`
# - show logging application hotpatch.log
pre_tasks:
- ansible.builtin.debug: var=ansible_ssh_user
- ansible.builtin.debug: var=ansible_ssh_pass
- ansible.builtin.debug: var=ansible_ssh_private_key_file
#----------------------------------------------------------------------------
# Roles
#----------------------------------------------------------------------------
roles:
- wait_for_ssh
#----------------------------------------------------------------------------
# Tasks
#----------------------------------------------------------------------------
# Errors with ISE <= 3.1
# Once you issue the `exit` command, you get a fatal error with another command
# fatal: [ise]: FAILED! => changed=false
# msg: 'cli prompt is not identified from the last received response window:
# b''exit\r\n\x1b>\x1b[24;1H\r\n[screen is terminating]\r\n'''
#----------------------------------------------------------------------------
tasks:
- name: ISE CLI
loop: "{{ commands }}"
vars:
cmd: "{{ item }}"
ansible.builtin.include_role:
name: ise_cli_exec
- name: Exit
ansible.netcommon.cli_command:
command: "exit"