-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_app_svcs_waf.yml
executable file
·50 lines (45 loc) · 1.5 KB
/
deploy_app_svcs_waf.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
#!/usr/bin/ansible-playbook
---
#
# Copyright (c) 2016 F5 Networks
# All rights reserved.
#
# author: Mark Lowcher F5 Networks
# description: This playbook will deploy an iApp with L7 services
# Rather than "test" as the ending of the template name
# you should change it to identify the customer. Use the syntax below
# to find and replace.
# :%s/WORD-To-Find-HERE/Replace-Word-Here/g
# Edit the .json file. Look for 20.20.20 and change the ip address to the
# desired VIP address. Look for vs_Name and change the vip name
#
- hosts: 10.0.0.40
gather_facts: false
vars:
server: 10.0.0.40
setup_user: admin
setup_pass: admin
tasks:
#Upload the iApp templated downloaded above to the BIG-IP
- name: Upload iApp template to BIG-IP
bigip_iapp_template:
server: "{{server}}"
user: "{{setup_user}}"
password: "{{setup_pass}}"
content: "{{ lookup('file', '/var/tmp/appsvcs_integration_v2.0.004_test.tmpl') }}"
state: "present"
validate_certs: False
delegate_to: localhost
#The body of the iApp is passed in as a JSON blob.
- name: Deploy iApp
bigip_iapp_service:
name: "app1-waf"
template: "appsvcs_integration_v2.0.004_test"
parameters: "{{ lookup('file', '/var/tmp/waf_final.json') }}"
server: "{{server}}"
user: "{{setup_user}}"
password: "{{setup_pass}}"
state: "present"
# state: "absent"
#State "absent" will remove the application
delegate_to: localhost