forked from llima3000/ansibledevops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreatePool.yml
41 lines (40 loc) · 982 Bytes
/
createPool.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
---
#ansible-playbook creadePool.yml
- hosts: localhost
connection: local
vars:
controller: 10.91.55.10
username: admin
password: Avi123$%
api_version: 17.2.7
tenant: admin
name: pool1
pool_description: Pool description
health_monitor: System-HTTP
server01:
ip:
addr: 10.10.2.20
type: V4
server02:
ip:
addr: 10.10.2.21
type: V4
roles:
- role: avinetworks.avisdk
tasks:
- name: Create a Pool with two servers and HTTP monitor
avi_pool:
username: "{{ username }}"
password: "{{ password }}"
controller: "{{ controller }}"
api_version: "{{ api_version }}"
name: "{{ name }}"
description: "{{ pool_description }}"
state: present
health_monitor_refs:
- "/api/healthmonitor?name={{ health_monitor }}"
servers:
-
"{{ server01 }}"
-
"{{ server02 }}"