forked from siamaksade/openshift-jenkins-demo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
f5_nodepool_vs_sec.yml
51 lines (48 loc) · 1.34 KB
/
f5_nodepool_vs_sec.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
---
- name: Configure F5 WAF
hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Gather EC2 facts
ec2_instance_info:
region: "{{ ec2_region }}"
filters:
instance-state-name: ["running","shutting-down", "stopping", "stopped"]
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: CreateVS with WAF
bigip_virtual_server:
description: VIP
destination: "{{ hostvars['localhost']['f5_private_ip'] }}"
name: "{{ f5_vs_name }}"
pool: "{{ f5_pool_name }}"
port: "443"
snat: Automap
default_persistence_profile: "source_addr"
security_log_profiles: "JuiceShop_Logging"
all_profiles:
- http
- JuiceShop_Client_SSL
- websecurity
all_policies:
- JuiceShop_Policy
provider:
user: "{{ f5_user }}"
password: "{{ f5_password }}"
server: "{{ hostvars['localhost']['f5_public_ip'] }}"
server_port: 8443
validate_certs: "{{ f5_validate_certs }}"
transport: rest
tags:
- f5_create_vs