forked from network-automation/toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
f5_full_lab.yml
62 lines (57 loc) · 1.71 KB
/
f5_full_lab.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
60
61
62
---
- name: BIG-IP SETUP
hosts: lb
connection: local
gather_facts: false
tasks:
- name: CREATE NODES
bigip_node:
server: "{{private_ip}}"
user: "{{ansible_user}}"
password: "{{ansible_ssh_pass}}"
server_port: "8443"
host: "{{hostvars[item].ansible_host}}"
name: "{{hostvars[item].inventory_hostname}}"
validate_certs: "no"
loop: "{{ groups['webservers'] }}"
- name: CREATE POOL
bigip_pool:
server: "{{private_ip}}"
user: "{{ansible_user}}"
password: "{{ansible_ssh_pass}}"
server_port: "8443"
name: "http_pool"
lb_method: "round-robin"
monitors: "/Common/http"
monitor_type: "and_list"
validate_certs: "no"
- name: ADD POOL MEMBERS
bigip_pool_member:
server: "{{private_ip}}"
user: "{{ansible_user}}"
password: "{{ansible_ssh_pass}}"
server_port: "8443"
state: "present"
name: "{{hostvars[item].inventory_hostname}}"
host: "{{hostvars[item].ansible_host}}"
port: "80"
pool: "http_pool"
validate_certs: "no"
loop: "{{ groups['webservers'] }}"
- name: ADD VIRTUAL SERVER
bigip_virtual_server:
server: "{{private_ip}}"
user: "{{ansible_user}}"
password: "{{ansible_ssh_pass}}"
server_port: "8443"
name: "vip"
destination: "{{private_ip}}"
port: "443"
enabled_vlans: "all"
all_profiles: ['http','clientssl','oneconnect']
pool: "http_pool"
snat: "Automap"
validate_certs: "no"
- name: PRINT OUT WEB VIP FOR F5
debug:
msg: "The VIP (Virtual IP) is https://{{ansible_host}}"