-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure_rm_subnet.html
145 lines (114 loc) · 5.43 KB
/
azure_rm_subnet.html
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
fred@fred-Virtual-Machine:~/task/shenjie/test/azure_rm_subnet/tasks$ ansible-playbook tasks.yml
[WARNING]: Skipping plugin (/usr/local/lib/python2.7/dist-
packages/ansible/plugins/connection/accelerate.py) as it seems to be invalid: cannot import
name key_for_hostname
PLAY [for azure_rm_dnszone playbook test] **************************************************
TASK [Gathering Facts] *********************************************************************
ok: [127.0.0.1]
TASK [create resource group] ***************************************************************
ok: [127.0.0.1]
TASK [Create virtual network] **************************************************************
ok: [127.0.0.1]
TASK [Create route table] ******************************************************************
ok: [127.0.0.1]
TASK [Remove subnet] ***********************************************************************
changed: [127.0.0.1]
TASK [Catch invalid cidr] ******************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Invalid address_prefix_cidr value 10.1.0/24"}
...ignoring
TASK [assert] ******************************************************************************
ok: [127.0.0.1] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Add the subnet back] *****************************************************************
changed: [127.0.0.1]
TASK [assert] ******************************************************************************
ok: [127.0.0.1] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Add the subnet back (idempontent)] ***************************************************
ok: [127.0.0.1]
TASK [assert] ******************************************************************************
ok: [127.0.0.1] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Create network security group] *******************************************************
ok: [127.0.0.1]
TASK [Update the subnet] *******************************************************************
changed: [127.0.0.1]
TASK [Should be idempotent] ****************************************************************
ok: [127.0.0.1]
TASK [assert] ******************************************************************************
ok: [127.0.0.1] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Create network security group in another resource group] *****************************
changed: [127.0.0.1]
TASK [Update the subnet] *******************************************************************
changed: [127.0.0.1]
TASK [assert] ******************************************************************************
ok: [127.0.0.1] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Update the subnet (idempotent)] ******************************************************
ok: [127.0.0.1]
TASK [assert] ******************************************************************************
ok: [127.0.0.1] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Get subnet facts] ********************************************************************
ok: [127.0.0.1]
TASK [debug] *******************************************************************************
ok: [127.0.0.1] => {
"output": {
"changed": false,
"failed": false,
"subnets": [
{
"address_prefix_cidr": "10.1.0.0/16",
"id": "/subscriptions/f64d4ee8-be94-457d-ba26-3fa6b6506cef/resourceGroups/v-xisuRG07/providers/Microsoft.Network/virtualNetworks/My_Virtual_Network/subnets/foobar",
"name": "foobar",
"provisioning_state": "Succeeded",
"resource_group": "v-xisuRG07",
"route_table": "/subscriptions/f64d4ee8-be94-457d-ba26-3fa6b6506cef/resourceGroups/v-xisuRG07/providers/Microsoft.Network/routeTables/routetableforsubnet",
"security_group": "/subscriptions/f64d4ee8-be94-457d-ba26-3fa6b6506cef/resourceGroups/v-xisuRG/providers/Microsoft.Network/networkSecurityGroups/secgroupfoo",
"service_endpoints": [
{
"locations": [
"eastus"
],
"provisioning_state": "Succeeded",
"service": "Microsoft.Sql"
}
],
"virtual_network_name": "My_Virtual_Network"
}
]
}
}
TASK [Assert that facts are returned] ******************************************************
ok: [127.0.0.1] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Remove subnet] ***********************************************************************
changed: [127.0.0.1]
TASK [Remove subnet (idempotent)] **********************************************************
ok: [127.0.0.1]
TASK [assert] ******************************************************************************
ok: [127.0.0.1] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [Remove security group] ***************************************************************
changed: [127.0.0.1]
TASK [Remove virtual network] **************************************************************
changed: [127.0.0.1]
PLAY RECAP *********************************************************************************
127.0.0.1 : ok=28 changed=8 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1