blob: 7fa155cdb71bf0f3e598e431ba1a8a60d3920789 (
plain)
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
|
# ansible-playbook ./firmware_upgrade.yml
- name: Upgrade WTI Device
hosts: "{{ansible_hosts}}" # pass as -e ansible_hosts=wti_demo on the commandline
collections:
- wti.remote
connection: local
gather_facts: False
tasks:
- set_fact: use_https=False
when: use_https is undefined
- set_fact: validate_certs=False
when: validate_certs is undefined
- name: upgrade WTI device checking online for new version
cpm_firmware_update:
cpm_url: "{{ansible_host}}"
cpm_username: "{{ansible_user}}"
cpm_password: "{{ansible_pw}}"
use_https: "{{use_https}}"
validate_certs: "{{validate_certs}}"
cpm_path: "/tmp/"
# when cpm_file is missing, the playbook will look online for the latest version
# cpm_file: "uimage_3352_tsm_arm.md5"
# cpm_file: "uimage_3352_128512_vmr_v2.15.md5"
register: testout
- name: dump test output
debug:
msg: "{{ testout['data'] }}"
|