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

@ -336,16 +336,16 @@ def commit(changes, retry_interval, wait, wait_timeout):
time.sleep(float(retry_interval))
if wait:
timeout_time = time.time() + wait_timeout
connection = changes.connection
change = result['ChangeResourceRecordSetsResponse']['ChangeInfo']
status = Status(connection, change)
while status.status != 'INSYNC' and time.time() < timeout_time:
time.sleep(WAIT_RETRY_SLEEP)
status.update()
if time.time() >= timeout_time:
raise TimeoutError()
return result
timeout_time = time.time() + wait_timeout
connection = changes.connection
change = result['ChangeResourceRecordSetsResponse']['ChangeInfo']
status = Status(connection, change)
while status.status != 'INSYNC' and time.time() < timeout_time:
time.sleep(WAIT_RETRY_SLEEP)
status.update()
if time.time() >= timeout_time:
raise TimeoutError()
return result
# Shamelessly copied over from https://git.io/vgmDG
IGNORE_CODE = 'Throttling'
@ -436,20 +436,20 @@ 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']:
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:
module.fail_json(msg = "parameter 'alias_hosted_zone_id' required for alias create/delete")
elif ( weight_in!=None or region_in!=None or failover_in!=None ) and identifier_in==None:
module.fail_json(msg= "If you specify failover, region or weight you must also specify identifier")
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:
module.fail_json(msg = "parameter 'alias_hosted_zone_id' required for alias create/delete")
elif ( weight_in!=None or region_in!=None or failover_in!=None ) and identifier_in==None:
module.fail_json(msg= "If you specify failover, region or weight you must also specify identifier")
if command_in == 'create':
if ( weight_in!=None or region_in!=None or failover_in!=None ) and identifier_in==None:
module.fail_json(msg= "If you specify failover, region or weight you must also specify identifier")
elif ( weight_in==None and region_in==None and failover_in==None ) and identifier_in!=None:
module.fail_json(msg= "You have specified identifier which makes sense only if you specify one of: weight, region or failover.")
if vpc_id_in and not private_zone_in:
@ -509,7 +509,7 @@ def main():
if identifier_in is not None:
identifier_in = str(identifier_in)
if rset.type == type_in and decoded_name.lower() == record_in.lower() and rset.identifier == identifier_in:
found_record = True
record['zone'] = zone_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",
@ -435,7 +435,7 @@ class AzureRMNetworkInterface(AzureRMModuleBase):
if self.check_mode:
return self.results
if changed:
if self.state == 'present':
if not nic:

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

@ -101,9 +101,9 @@ state:
description: Facts about the current state of the object.
returned: always
type: dict
sample:{
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

@ -140,9 +140,9 @@ EXAMPLES = '''
- name: DenySSH
protocol: TCP
destination_port_range: 22
access: Deny
access: Deny
priority: 100
direction: Inbound
direction: Inbound
- name: 'AllowSSH'
protocol: TCP
source_address_prefix: '174.109.158.0/24'
@ -161,14 +161,14 @@ EXAMPLES = '''
destination_port_range: 22-23
access: Deny
priority: 100
direction: Inbound
direction: Inbound
- name: AllowSSHFromHome
protocol: TCP
source_address_prefix: '174.109.158.0/24'
destination_port_range: 22-23
access: Allow
priority: 102
direction: Inbound
direction: Inbound
tags:
testing: testing
delete: on-exit
@ -176,7 +176,7 @@ EXAMPLES = '''
# Delete security group
- azure_rm_securitygroup:
resource_group: mygroup
name: mysecgroup
name: mysecgroup
state: absent
'''
@ -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,
@ -354,7 +354,7 @@ def validate_rule(rule, rule_type=None):
raise Exception("Rule name value is required.")
if not NAME_PATTERN.match(rule.get('name')):
raise Exception("Rule name must contain only word characters plus '.','-','_'")
priority = rule.get('priority', None)
if not priority:
raise Exception("Rule priority is required.")
@ -445,7 +445,7 @@ def create_rule_instance(rule):
destination_port_range=rule.get('destination_port_range', None),
priority=rule.get('priority', None),
provisioning_state=rule.get('provisioning_state', None),
name=rule.get('name', None),
name=rule.get('name', None),
etag=rule.get('etag', None)
)
@ -480,7 +480,7 @@ def create_network_security_group_dict(nsg):
name=nsg.name,
type=nsg.type,
location=nsg.location,
tags=nsg.tags,
tags=nsg.tags,
)
results['rules'] = []
if nsg.security_rules:
@ -539,7 +539,7 @@ class AzureRMSecurityGroup(AzureRMModuleBase):
supports_check_mode=True)
def exec_module(self, **kwargs):
for key in self.module_arg_spec.keys() + ['tags']:
setattr(self, key, kwargs[key])

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": {
@ -450,7 +450,7 @@ def extract_names_from_blob_uri(blob_uri):
return extracted_names
class AzureRMVirtualMachine(AzureRMModuleBase):
class AzureRMVirtualMachine(AzureRMModuleBase):
def __init__(self):

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

@ -46,11 +46,11 @@ options:
required: false
cpu_period:
description:
- Limit CPU CFS (Completely Fair Scheduler) period
- Limit CPU CFS (Completely Fair Scheduler) period
default: 0
cpu_quota:
description:
- Limit CPU CFS (Completely Fair Scheduler) quota
- Limit CPU CFS (Completely Fair Scheduler) quota
default: 0
cpuset_cpus:
description:
@ -69,7 +69,7 @@ options:
required: false
detach:
description:
- Enable detached mode to leave the container running in background.
- Enable detached mode to leave the container running in background.
If disabled, fail unless the process exits cleanly.
default: true
devices:
@ -100,7 +100,7 @@ options:
required: false
etc_hosts:
description:
- Dict of host-to-IP mappings, where each host name is key in the dictionary. Hostname will be added to the
- Dict of host-to-IP mappings, where each host name is key in the dictionary. Hostname will be added to the
container's /etc/hosts file.
default: null
required: false
@ -120,7 +120,7 @@ options:
default: false
groups:
description:
- List of additional group names and/or IDs that the container process will run as.
- List of additional group names and/or IDs that the container process will run as.
default: null
required: false
hostname:
@ -133,7 +133,7 @@ options:
- When state is present or started the module compares the configuration of an existing
container to requested configuration. The evaluation includes the image version. If
the image vesion in the registry does not match the container, the container will be
rebuilt. To stop this behavior set ignore_image to true.
rebuilt. To stop this behavior set ignore_image to true.
default: false
image:
description:
@ -147,7 +147,7 @@ options:
default: false
ipc_mode:
description:
- Set the IPC mode for the container. Can be one of
- Set the IPC mode for the container. Can be one of
'container:<name|id>' to reuse another container's IPC namespace
or 'host' to use the host's IPC namespace within the container.
default: null
@ -155,7 +155,7 @@ options:
keep_volumes:
description:
- Retain volumes associated with a removed container.
default: true
default: true
kill_signal:
description:
- Override default signal used to kill a running container.
@ -190,7 +190,7 @@ options:
defult: json-file
log_options:
description:
- Dictionary of options specific to the chosen log_driver. See https://docs.docker.com/engine/admin/logging/overview/
- Dictionary of options specific to the chosen log_driver. See https://docs.docker.com/engine/admin/logging/overview/
for details.
required: false
default: null
@ -281,7 +281,7 @@ options:
default: false
registry:
description:
- Registry URL from which to pull images. If not specified, images will be pulled from
- Registry URL from which to pull images. If not specified, images will be pulled from
the default registry found in the local docker config.json file.
default: null
required: false
@ -295,14 +295,14 @@ options:
choices:
- on-failure
- always
default: on-failure
default: on-failure
restart_retries:
description:
- Use with restart policy to control maximum number of restart attempts.
default: 0
default: 0
shm_size:
description:
- Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater than `0`.
- Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater than `0`.
Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes).
- Ommitting the unit defaults to bytes. If you omit the size entirely, the system uses `64m`.
default: null
@ -319,15 +319,15 @@ options:
- '"present" - Asserts the existence of a container matching the name and any provided configuration parameters. If no
container matches the name, a container will be created. If a container matches the name but the provided configuration
does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created
with the requested config. Image version will be taken into account when comparing configuration. To ignore image
with the requested config. Image version will be taken into account when comparing configuration. To ignore image
version use the ignore_image option. Use the recreate option to force the re-creation of the matching container. Use
force_kill to kill the container rather than stopping it. Use keep_volumes to retain volumes associated with a removed
container.'
- '"started" - Asserts there is a running container matching the name and any provided configuration. If no container
matches the name, a container will be created and started. If a container matching the name is found but the
configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed
and a new container will be created with the requested configuration and started. Image version will be taken into
account when comparing configuration. To ignore image version use the ignore_image option. Use recreate to always
and a new container will be created with the requested configuration and started. Image version will be taken into
account when comparing configuration. To ignore image version use the ignore_image option. Use recreate to always
re-create a matching container, even if it is running. Use restart to force a matching container to be stopped and
restarted. Use force_kill to kill a container rather than stopping it. Use keep_volumes to retain volumes associated
with a removed container.'
@ -343,7 +343,7 @@ options:
stop_signal:
description:
- Override default signal used to stop the container.
default: null
default: null
required: false
stop_timeout:
description:
@ -378,7 +378,7 @@ options:
- List of volumes to mount within the container.
- "Use docker CLI-style syntax: C(/host:/container[:mode])"
- You can specify a read mode for the mount with either C(ro) or C(rw).
- SELinux hosts can additionally use C(z) or C(Z) to use a shared or
- SELinux hosts can additionally use C(z) or C(Z) to use a shared or
private label for the volume.
default: null
required: false
@ -389,7 +389,7 @@ options:
required: false
volumes_from:
description:
- List of container names or Ids to get volumes from.
- List of container names or Ids to get volumes from.
default: null
required: false
@ -436,7 +436,7 @@ EXAMPLES = '''
docker_container:
name: myapplication
image: someuser/appimage
state: started
state: started
restart: yes
links:
- "myredis:aliasedredis"
@ -471,10 +471,10 @@ EXAMPLES = '''
name: ohno
state: absent
- name: Syslogging output
- name: Syslogging output
docker_container:
name: myservice
state: started
state: started
log_driver: syslog
log_opt:
syslog-address: tcp://my-syslog-server:514
@ -528,6 +528,7 @@ container:
"/tmp/lnmp/nginx-sites/logs/": {}
},
...
}
}
'''
@ -910,7 +911,7 @@ class TaskParameters(DockerBaseClass):
class Container(DockerBaseClass):
def __init__(self, container, parameters):
super(Container, self).__init__()
self.raw = container

View file

@ -68,7 +68,7 @@ images:
description: Facts for the selected images.
returned: always
type: dict
sample:[
sample: [
{
"Architecture": "amd64",
"Author": "",
@ -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": [
@ -241,4 +241,4 @@ def main():
from ansible.module_utils.basic import *
if __name__ == '__main__':
main()
main()

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()
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