29 lines
998 B
YAML
29 lines
998 B
YAML
---
|
|
# tasks file for aruba_get-boot-info
|
|
- name: Execute show flash on the switch
|
|
arubaoss_command:
|
|
commands: ['show flash']
|
|
register: flash
|
|
- name: set facts for boot images
|
|
ansible.builtin.set_fact:
|
|
primary: "{{ (flash.stdout_lines[0][2] | split(':'))[1] | trim }}"
|
|
primary_version: "{{ (((((flash.stdout_lines[0][2] | split(':'))[1]) | split(' '))[6]) | split('.'))[1:] | join('.') }}"
|
|
secondary: "{{ (flash.stdout_lines[0][3] | split(':'))[1] | trim }}"
|
|
boot: "{{ (flash.stdout_lines[0][9] | split(':'))[1] | trim }}"
|
|
type: "{{ (((((flash.stdout_lines[0][2] | split(':'))[1]) | split(' '))[6]) | split('.'))[0] }}"
|
|
|
|
- name: show primary boot image version
|
|
debug:
|
|
var: primary
|
|
- name: show secondary boot image version
|
|
debug:
|
|
var: secondary
|
|
- name: show default boot
|
|
debug:
|
|
var: boot
|
|
- name: show type
|
|
debug:
|
|
var: type
|
|
- name: show primary version
|
|
debug:
|
|
var: primary_version |