-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathf5_preferences.yml
executable file
·59 lines (53 loc) · 1.93 KB
/
f5_preferences.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/ansible-playbook
---
#
# Copyright (c) 2016 F5 Networks
# All rights reserved.
#
# author: Mark Lowcher F5 Networks
# description: This playbook will change the followin preferences on the
# F5 loadbalancer.
# - Change the default of basic to advanced on all pages in the GUI.
# - Change records per screen from the default of 10 to the number specified.
# - Apply the specified message as the security banner on the gui login page.
# - Sync the config to the second device in the device cluster.
- name: F5 Setup
hosts: localhost
connection: local
gather_facts: no
vars:
setup_user: "admin"
setup_pass: "admin"
appliance: "192.168.71.141"
tasks:
- name: Change preference from basic to advanced
icontrol_install_config:
method: PATCH
uri: "/mgmt/tm/sys/db/ui.system.preferences.advancedselection"
body: '{"value":"advanced"}'
host: "{{appliance}}"
username: "{{setup_user}}"
password: "{{setup_pass}}"
- name: Change records per screen to 20
icontrol_install_config:
method: PATCH
uri: "/mgmt/tm/sys/db/ui.system.preferences.recordsperscreen"
body: '{"value":"20"}'
host: "{{appliance}}"
username: "{{setup_user}}"
password: "{{setup_pass}}"
- name: Apply security banner
icontrol_install_config:
method: PATCH
uri: "/mgmt/tm/sys/globalSettings"
body: '{"gui-security-banner":"enabled","gui-security-banner-text":"**** WARNING **** This system is restricted solely to F5 authorized users for legitimate purposes only. Stay out!"}'
host: "{{appliance}}"
username: "{{setup_user}}"
password: "{{setup_pass}}"
# - name: Config Sync
# icontrol_install_config:
# uri: "mgmt/tm/cm/"
# body: '{"command":"run","utilCmdArgs":"config-sync to-group SyncFail"}'
# host: "{{appliance}}"
# username: "{{setup_user}}"
# password: "{{setup_pass}}"