-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathF5-VIP-Creation.yml
70 lines (64 loc) · 1.62 KB
/
F5-VIP-Creation.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
# Create a VIP
#
# Variables
# partition_name
# vip_name
# vip_address
# vip_port
# pool_name
# vip_desc
# f5_server
# device_group
# by Devin St. Clair
---
- hosts: localhost
gather_facts: no
become: no
vars_files:
- lab_vault.yml
collections:
- f5networks.f5_modules.bigip_virtual_server
- f5networks.f5_modules.bigip_config
- f5networks.f5_modules.bigip_configsync_action
tasks:
- name: Add virtual server
f5networks.f5_modules.bigip_virtual_server:
state: present
partition: "{{ partition_name }}"
name: "{{ vip_name }}"
destination: "{{ vip_address }}"
port: "{{ vip_port }}"
pool: "{{ pool_name }}"
snat: Automap
description: "{{ vip_desc }}"
profiles:
- http
- name: AA_READY_FOR_VENAFI
context: client-side
policies:
enabled_vlans: all
provider:
server: "{{ f5_server }}"
user: "{{ username_rw }}"
password: "{{ password_rw }}"
delegate_to: localhost
tags: vip
- name: Save the running configuration of the BIG-IP
f5networks.f5_modules.bigip_config:
save: yes
verify: yes
provider:
server: "{{ f5_server }}"
user: "{{ username_rw }}"
password: "{{ password_rw }}"
validate_certs: no
delegate_to: localhost
- name: Sync configuration from device to group
f5networks.f5_modules.bigip_configsync_action:
device_group: "{{ device_group }}"
sync_device_to_group: yes
provider:
server: "{{ f5_server }}"
user: "{{ f5_user }}"
password: "{{ f5_pass }}"
delegate_to: localhost