forked from acoston/Ansible-EfficientIP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook-sample.yml
75 lines (67 loc) · 1.77 KB
/
playbook-sample.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
---
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: list space
efficientip:
eip_server: server.mydomain.com
eip_username: dummyusername
eip_password: dummypassword
space: LIST
- name: list subnet of a space
efficientip:
eip_server: server.mydomain.com
eip_username: dummyusername
eip_password: dummypassword
subnet: LIST
space: NY_space
classparam: 'metadata1=somedata'
register: eip
- name: find one free IP address on a subnet
efficientip:
eip_server: server.mydomain.com
eip_username: dummyusername
eip_password: dummypassword
hostaddr: FIND_FREE
subnet_id: 4
register: eip
- name: add IP on space
efficientip:
eip_server: server.mydomain.com
eip_username: dummyusername
eip_password: dummypassword
type: A
state: present
space: NY_space
record: test.mydomain.com
hostaddr: '{{ eip.result.output }}'
- name: delete IP address
efficientip:
eip_server: server.mydomain.com
eip_username: dummyusername
eip_password: dummypassword
type: A
state: absent
space: NY_space
hostaddr: 127.0.0.1
- name: add CNAME
efficientip:
eip_server: server.mydomain.com
eip_username: dummyusername
eip_password: dummypassword
type: CNAME
state: present
alias_fqdn: alias.mydomain.net
alias_value: hostname.mydomain.net
alias_ttl: 600
- name: delete CNAME
efficientip:
eip_server: server.mydomain.com
eip_username: dummyusername
eip_password: dummypassword
type: CNAME
state: absent
alias_fqdn: alias.mydomain.net
alias_value: hostname.mydomain.net
alias_ttl: 600