-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathise.app_status.yaml
39 lines (33 loc) · 1.48 KB
/
ise.app_status.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
---
- name: Show ISE Application Status
hosts: ise
gather_facts: no
vars_files: vars/main.yaml
tasks:
# - ansible.builtin.debug:
# # msg: "{{ stdout | regex_search('Application Server') | split('[\s]+')[1] == 'running' }}"
# msg:
# - stdout is search('Application Server*[0-9]+*')
# # - "{{ stdout | search('Application Server*[0-9]+*') }}"
# - "{{ stdout | regex_search('Application Server[ ]+running') }}"
# - "{{ stdout | regex_search('^Application Server') }}"
# # when: "{{ item }}" is match("Application Server*[0-9]+*")
# The ISE Application Server STATE may be { not running | initializing | running }
# Example status output:
# ```
# ISE PROCESS NAME STATE PROCESS ID
# --------------------------------------------------------------------
# Database Listener running 7540
# Database Server running 129 PROCESSES
# Application Server running 55108
# ...
- name: ISE CLI | {{ inventory_hostname }} ({{ ansible_host }})
vars:
cmd: show application status ise
ansible.builtin.include_tasks: tasks/ise/cli_command.yaml
- name: ISE CLI exit | {{ inventory_hostname }} ({{ ansible_host }})
vars:
cmd: exit
ansible.builtin.include_tasks: tasks/ise/cli_command.yaml
register: output
- ansible.builtin.debug: var=output