forked from siamaksade/openshift-jenkins-demo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
f5_nodepool_vs.yml
86 lines (81 loc) · 2.21 KB
/
f5_nodepool_vs.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
- name: Configure F5 Nodepool
hosts: localhost
connection: local
gather_facts: false
become: false
tasks:
- name: Gather EC2 facts
ec2_instance_info:
region: "{{ ec2_region }}"
filters:
instance-state-name: ["running"]
register: ec2
tags:
- ec2-facts
- name: Create Facts for F5 configuration
set_fact:
f5_public_ip: "{{ item.public_ip_address }}"
f5_private_ip: "{{ item.private_ip_address }}"
cacheable: true
when: (item.tags.function == ec2_f5_tag)
loop: "{{ ec2.instances }}"
tags:
- f5_facts
- name: Create {{ f5_pool_name }} Pool
bigip_pool:
name: "{{ f5_pool_name }}"
lb_method: round-robin
state: "{{ ec2_f5_state }}"
monitors: ['/Common/http']
monitor_type: and_list
provider:
user: "{{ f5_user }}"
password: "{{ f5_password }}"
server: "{{ f5_public_ip }}"
server_port: 8443
validate_certs: "{{ f5_validate_certs }}"
transport: rest
tags:
- create-pool
- name: Create Pool Members
bigip_pool_member:
pool: "{{ f5_pool_name }}"
host: "{{ item.private_ip_address }}"
port: 3000
state: "{{ ec2_f5_state }}"
provider:
server_port: 8443
user: "{{ f5_user }}"
password: "{{ f5_password }}"
server: "{{ f5_public_ip }}"
validate_certs: "{{ f5_validate_certs }}"
transport: rest
when: (item.tags.function == ec2_webserver_tag)
loop: "{{ ec2.instances }}"
tags:
- create-pool
- name: Create {{ f5_vs_name }} VS
bigip_virtual_server:
description: "{{ f5_vs_name }}"
destination: "{{ f5_private_ip }}"
name: "{{ f5_vs_name }}"
pool: "{{ f5_pool_name }}"
port: "443"
snat: Automap
default_persistence_profile: "source_addr"
all_profiles:
- http
- JuiceShop_Client_SSL
- websecurity
all_policies:
- redhat_disable_waf
provider:
user: "{{ f5_user }}"
password: "{{ f5_password }}"
server: "{{ f5_public_ip }}"
server_port: 8443
validate_certs: "{{ f5_validate_certs }}"
transport: rest
tags:
- f5-vs