-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqkview.yml
executable file
·39 lines (31 loc) · 1.18 KB
/
qkview.yml
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
#!/usr/bin/ansible-playbook
---
#
# Copyright (c) 2016 F5 Networks
# All rights reserved.
#
# author: Mark Lowcher F5 Networks
# description: This playbook will run a qkview on the systems
# defined as [loadbalancer] in the /etc/ansible/hosts file.
# It will then upload the qkview to dropbox.f5.com.
# You need to replace the variables below with your case
# number and email address used when opening the case.
# It will then delete all qkviews on the target loadbalancer.
# The F5 devices must have internet access for the upload to dropbox
# to work.
- hosts: loadbalancer[0]
vars:
case_number: "C123456"
password: "[email protected]"
tasks:
- name: Delete any qkviews already on the device(s)
raw: rm -f /var/tmp/*.qkview
- name: Run qkview
raw: qkview
- name: Wait one minute for qkview to finish
wait_for:
timeout: 60
- name: Upload qkview to dropbox
raw: sshpass -p "{{password}}" scp -r /var/tmp/*.qkview "{{case_number}}"@dropbox.f5.com:/
- name: delete qkview from F5 devices
raw: rm -f /var/tmp/*.qkview