-
Notifications
You must be signed in to change notification settings - Fork 10
/
playbook-sample.yml
71 lines (63 loc) · 2 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
---
- hosts: localhost
connection: local
gather_facts: False
tasks:
- name: list space
eip:
ipm_server=<your_ipm_ipaddress_or_hostname_here>
ipm_username=<your_ipm_user_here>
ipm_password=<your_ipm_pwd_here>
ipm_action=ip_space_list
- name: list subnet of a space
eip:
ipm_server=<your_ipm_ipaddress_or_hostname_here>
ipm_username=<your_ipm_user_here>
ipm_password=<your_ipm_pwd_here>
ipm_action=ip_subnet_list
ipm_space='NY_space'
ipm_classparam='class_param_object1=value1'
register: eip
- name: find one free IP address on a subnet
eip:
ipm_server=<your_ipm_ipaddress_or_hostname_here>
ipm_username=<your_ipm_user_here>
ipm_password=<your_ipm_pwd_here>
ipm_action=ip_address_find_free
ipm_subnet_id=4
register: eip
- name: add IP on space
eip:
ipm_server=<your_ipm_ipaddress_or_hostname_here>
ipm_username=<your_ipm_user_here>
ipm_password=<your_ipm_pwd_here>
ipm_action=ip_address_add
ipm_space='NY_space'
ipm_hostname=put-your-hostname-here
ipm_macaddr=00:11:22:33:44:55
ipm_classparam='class_param_object1=value1&class_param_object2=value2&...'
ipm_hostaddr='{{ eip.result.output }}'
- name: delete IP address
eip:
ipm_server=<your_ipm_ipaddress_or_hostname_here>
ipm_username=<your_ipm_user_here>
ipm_password=<your_ipm_pwd_here>
ipm_action=ip_address_delete
ipm_space='NY_space'
ipm_hostaddr=192.168.1.152
- name: add CNAME
eip:
ipm_server=<your_ipm_ipaddress_or_hostname_here>
ipm_username=<your_ipm_user_here>
ipm_password=<your_ipm_pwd_here>
ipm_action=dns_cname_add
ipm_alias_fqdn=alias.mydomain.net
ipm_alias_value=hostname.mydomain.net
ipm_alias_ttl=600
- name: delete CNAME
eip:
ipm_server=<your_ipm_ipaddress_or_hostname_here>
ipm_username=<your_ipm_user_here>
ipm_password=<your_ipm_pwd_here>
ipm_action=dns_cname_delete
ipm_alias_fqdn=alias.mydomain.net