ansible-validate-modules part 4: Enable check on ansible-modules-core (#3526)

* Call ansible-validate-modules

* Correct quotes + add newline
This commit is contained in:
John R Barker 2016-05-03 15:51:12 +01:00 committed by Matt Clay
parent fa00c69ff2
commit d13046a905
18 changed files with 106 additions and 85 deletions

View file

@ -436,7 +436,7 @@ def main():
if command_in == 'create' or command_in == 'delete':
if not value_in:
module.fail_json(msg = "parameter 'value' required for create/delete")
elif module.params['alias']:
elif alias_in:
if len(value_list) != 1:
module.fail_json(msg = "parameter 'value' must contain a single dns name for alias create/delete")
elif not alias_hosted_zone_id_in:

View file

@ -199,7 +199,7 @@ state:
"internal_fqdn": null
},
"enable_ip_forwarding": false,
"etag": "W/\"be115a43-2148-4545-a324-f33ad444c926\"",
"etag": 'W/"be115a43-2148-4545-a324-f33ad444c926"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkInterfaces/nic003",
"ip_configuration": {
"name": "default",

View file

@ -92,7 +92,7 @@ objects:
"internal_fqdn": null
},
"enable_ip_forwarding": false,
"etag": "W/\"59726bfc-08c4-44ed-b900-f6a559876a9d\"",
"etag": 'W/"59726bfc-08c4-44ed-b900-f6a559876a9d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkInterfaces/nic003",
"ip_configuration": {
"name": "default",

View file

@ -103,7 +103,7 @@ state:
type: dict
sample: {
"dns_settings": {},
"etag": "W/\"a5e56955-12df-445a-bda4-dc129d22c12f\"",
"etag": '"/"a5e56955-12df-445a-bda4-dc129d22c12f"',
"idle_timeout_in_minutes": 4,
"ip_address": "52.160.103.93",
"location": "westus",

View file

@ -78,7 +78,7 @@ objects:
returned: always
type: list
sample: [{
"etag": "W/\"a31a6d7d-cb18-40a5-b16d-9f4a36c1b18a\"",
"etag": 'W/"a31a6d7d-cb18-40a5-b16d-9f4a36c1b18a"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/publicIPAddresses/pip2001",
"location": "eastus2",
"name": "pip2001",

View file

@ -193,7 +193,7 @@ state:
"destination_address_prefix": "VirtualNetwork",
"destination_port_range": "*",
"direction": "Inbound",
"etag": "W/\"edf48d56-b315-40ca-a85d-dbcb47f2da7d\"",
"etag": 'W/"edf48d56-b315-40ca-a85d-dbcb47f2da7d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/mysecgroup/defaultSecurityRules/AllowVnetInBound",
"name": "AllowVnetInBound",
"priority": 65000,
@ -208,7 +208,7 @@ state:
"destination_address_prefix": "*",
"destination_port_range": "*",
"direction": "Inbound",
"etag": "W/\"edf48d56-b315-40ca-a85d-dbcb47f2da7d\"",
"etag": 'W/"edf48d56-b315-40ca-a85d-dbcb47f2da7d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/mysecgroup/defaultSecurityRules/AllowAzureLoadBalancerInBound",
"name": "AllowAzureLoadBalancerInBound",
"priority": 65001,
@ -223,7 +223,7 @@ state:
"destination_address_prefix": "*",
"destination_port_range": "*",
"direction": "Inbound",
"etag": "W/\"edf48d56-b315-40ca-a85d-dbcb47f2da7d\"",
"etag": 'W/"edf48d56-b315-40ca-a85d-dbcb47f2da7d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/mysecgroup/defaultSecurityRules/DenyAllInBound",
"name": "DenyAllInBound",
"priority": 65500,
@ -238,7 +238,7 @@ state:
"destination_address_prefix": "VirtualNetwork",
"destination_port_range": "*",
"direction": "Outbound",
"etag": "W/\"edf48d56-b315-40ca-a85d-dbcb47f2da7d\"",
"etag": 'W/"edf48d56-b315-40ca-a85d-dbcb47f2da7d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/mysecgroup/defaultSecurityRules/AllowVnetOutBound",
"name": "AllowVnetOutBound",
"priority": 65000,
@ -253,7 +253,7 @@ state:
"destination_address_prefix": "Internet",
"destination_port_range": "*",
"direction": "Outbound",
"etag": "W/\"edf48d56-b315-40ca-a85d-dbcb47f2da7d\"",
"etag": 'W/"edf48d56-b315-40ca-a85d-dbcb47f2da7d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/mysecgroup/defaultSecurityRules/AllowInternetOutBound",
"name": "AllowInternetOutBound",
"priority": 65001,
@ -268,7 +268,7 @@ state:
"destination_address_prefix": "*",
"destination_port_range": "*",
"direction": "Outbound",
"etag": "W/\"edf48d56-b315-40ca-a85d-dbcb47f2da7d\"",
"etag": 'W/"edf48d56-b315-40ca-a85d-dbcb47f2da7d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/mysecgroup/defaultSecurityRules/DenyAllOutBound",
"name": "DenyAllOutBound",
"priority": 65500,
@ -289,7 +289,7 @@ state:
"destination_address_prefix": "*",
"destination_port_range": "22",
"direction": "Inbound",
"etag": "W/\"edf48d56-b315-40ca-a85d-dbcb47f2da7d\"",
"etag": 'W/"edf48d56-b315-40ca-a85d-dbcb47f2da7d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/mysecgroup/securityRules/DenySSH",
"name": "DenySSH",
"priority": 100,
@ -304,7 +304,7 @@ state:
"destination_address_prefix": "*",
"destination_port_range": "22",
"direction": "Inbound",
"etag": "W/\"edf48d56-b315-40ca-a85d-dbcb47f2da7d\"",
"etag": 'W/"edf48d56-b315-40ca-a85d-dbcb47f2da7d"',
"id": "/subscriptions/3f7e29ba-24e0-42f6-8d9c-5149a14bda37/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/mysecgroup/securityRules/AllowSSH",
"name": "AllowSSH",
"priority": 101,

View file

@ -78,14 +78,14 @@ objects:
returned: always
type: list
sample: [{
"etag": "W/\"d036f4d7-d977-429a-a8c6-879bc2523399\"",
"etag": 'W/"d036f4d7-d977-429a-a8c6-879bc2523399"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/secgroup001",
"location": "eastus2",
"name": "secgroup001",
"properties": {
"defaultSecurityRules": [
{
"etag": "W/\"d036f4d7-d977-429a-a8c6-879bc2523399\"",
"etag": 'W/"d036f4d7-d977-429a-a8c6-879bc2523399"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/secgroup001/defaultSecurityRules/AllowVnetInBound",
"name": "AllowVnetInBound",
"properties": {
@ -102,7 +102,7 @@ objects:
}
},
{
"etag": "W/\"d036f4d7-d977-429a-a8c6-879bc2523399\"",
"etag": 'W/"d036f4d7-d977-429a-a8c6-879bc2523399"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/secgroup001/defaultSecurityRules/AllowAzureLoadBalancerInBound",
"name": "AllowAzureLoadBalancerInBound",
"properties": {
@ -119,7 +119,7 @@ objects:
}
},
{
"etag": "W/\"d036f4d7-d977-429a-a8c6-879bc2523399\"",
"etag": 'W/"d036f4d7-d977-429a-a8c6-879bc2523399"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/secgroup001/defaultSecurityRules/DenyAllInBound",
"name": "DenyAllInBound",
"properties": {
@ -136,7 +136,7 @@ objects:
}
},
{
"etag": "W/\"d036f4d7-d977-429a-a8c6-879bc2523399\"",
"etag": 'W/"d036f4d7-d977-429a-a8c6-879bc2523399"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/secgroup001/defaultSecurityRules/AllowVnetOutBound",
"name": "AllowVnetOutBound",
"properties": {
@ -153,7 +153,7 @@ objects:
}
},
{
"etag": "W/\"d036f4d7-d977-429a-a8c6-879bc2523399\"",
"etag": 'W/"d036f4d7-d977-429a-a8c6-879bc2523399"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/secgroup001/defaultSecurityRules/AllowInternetOutBound",
"name": "AllowInternetOutBound",
"properties": {
@ -170,7 +170,7 @@ objects:
}
},
{
"etag": "W/\"d036f4d7-d977-429a-a8c6-879bc2523399\"",
"etag": 'W/"d036f4d7-d977-429a-a8c6-879bc2523399"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkSecurityGroups/secgroup001/defaultSecurityRules/DenyAllOutBound",
"name": "DenyAllOutBound",
"properties": {

View file

@ -1,4 +1,4 @@
##!/usr/bin/python
#!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>

View file

@ -352,7 +352,7 @@ state:
"enableIPForwarding": false,
"ipConfigurations": [
{
"etag": "W/\"041c8c2a-d5dd-4cd7-8465-9125cfbe2cf8\"",
"etag": 'W/"041c8c2a-d5dd-4cd7-8465-9125cfbe2cf8"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/networkInterfaces/testvm10_NIC01/ipConfigurations/default",
"name": "default",
"properties": {

View file

@ -123,7 +123,7 @@ state:
"127.0.0.1",
"127.0.0.3"
],
"etag": "W/\"0712e87c-f02f-4bb3-8b9e-2da0390a3886\"",
"etag": 'W/"0712e87c-f02f-4bb3-8b9e-2da0390a3886"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/virtualNetworks/my_test_network",
"location": "eastus",
"name": "my_test_network",

View file

@ -82,7 +82,7 @@ objects:
returned: always
type: list
sample: [{
"etag": "W/\"532ba1be-ae71-40f2-9232-3b1d9cf5e37e\"",
"etag": 'W/"532ba1be-ae71-40f2-9232-3b1d9cf5e37e"',
"id": "/subscriptions/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX/resourceGroups/Testing/providers/Microsoft.Network/virtualNetworks/vnet2001",
"location": "eastus2",
"name": "vnet2001",

View file

@ -529,6 +529,7 @@ container:
},
...
}
}
'''
import logging

View file

@ -111,7 +111,7 @@ images:
"Cmd": [
"/bin/sh",
"-c",
"#(nop) CMD [\"/etc/docker/registry/config.yml\"]"
'#(nop) CMD ["/etc/docker/registry/config.yml"]'
],
"Domainname": "",
"Entrypoint": [

View file

@ -87,6 +87,7 @@ options:
- Project name or ID containing the network (name admin-only)
required: false
default: None
version_added: "2.1"
requirements: ["shade"]
'''

View file

@ -110,6 +110,7 @@ options:
- Project name or ID containing the subnet (name admin-only)
required: false
default: None
version_added: "2.1"
requirements:
- "python >= 2.6"
- "shade"

View file

@ -168,5 +168,3 @@ from ansible.module_utils.openswitch import *
if __name__ == '__main__':
main()

View file

@ -239,8 +239,7 @@ from ansible.module_utils.urls import *
from ansible.module_utils.netcfg import *
from ansible.module_utils.shell import *
from ansible.module_utils.openswitch import *
if __name__ == '__main__':
main()

View file

@ -1,3 +1,24 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# this is a windows documentation stub. actual code lives in the .ps1
# file of the same name
DOCUMENTATION='''
---
module: win_reboot