From 37513ca8bba7c484d5ae30f93175562d0fbd7b66 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 1 Apr 2016 16:58:30 -0400 Subject: [PATCH] corrected required docs as only boolean is allowed these complex values were not displayed and would always show the fields as requried --- lib/ansible/modules/cloud/amazon/ec2_vpc.py | 4 ++-- lib/ansible/modules/cloud/amazon/elasticache.py | 2 +- lib/ansible/modules/cloud/openstack/os_router.py | 3 ++- lib/ansible/modules/cloud/openstack/os_subnet.py | 7 ++++--- lib/ansible/modules/cloud/openstack/os_user.py | 3 ++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc.py b/lib/ansible/modules/cloud/amazon/ec2_vpc.py index 206ae6743a..97ec7401f9 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc.py @@ -24,8 +24,8 @@ version_added: "1.4" options: cidr_block: description: - - "The cidr block representing the VPC, e.g. 10.0.0.0/16" - required: false, unless state=present + - "The cidr block representing the VPC, e.g. 10.0.0.0/16", required when I(state) is 'present'. + required: false instance_tenancy: description: - "The supported tenancy options for instances launched into the VPC." diff --git a/lib/ansible/modules/cloud/amazon/elasticache.py b/lib/ansible/modules/cloud/amazon/elasticache.py index 41177ac0f8..08b6b6eebc 100644 --- a/lib/ansible/modules/cloud/amazon/elasticache.py +++ b/lib/ansible/modules/cloud/amazon/elasticache.py @@ -68,7 +68,7 @@ options: cache_subnet_group: description: - The subnet group name to associate with. Only use if inside a vpc. Required if inside a vpc - required: conditional + required: false default: None version_added: "1.7" security_group_ids: diff --git a/lib/ansible/modules/cloud/openstack/os_router.py b/lib/ansible/modules/cloud/openstack/os_router.py index f0df8b144c..e3de749d68 100644 --- a/lib/ansible/modules/cloud/openstack/os_router.py +++ b/lib/ansible/modules/cloud/openstack/os_router.py @@ -54,8 +54,9 @@ options: network: description: - Unique name or ID of the external gateway network. + - required I(interfaces) or I(enable_snat) are provided, type: string - required: true when I(interfaces) or I(enable_snat) are provided, + required: false false otherwise. default: None external_fixed_ips: diff --git a/lib/ansible/modules/cloud/openstack/os_subnet.py b/lib/ansible/modules/cloud/openstack/os_subnet.py index 19354ccf3f..4d06425d2c 100644 --- a/lib/ansible/modules/cloud/openstack/os_subnet.py +++ b/lib/ansible/modules/cloud/openstack/os_subnet.py @@ -42,7 +42,8 @@ options: network_name: description: - Name of the network to which the subnet should be attached - required: true when state is 'present' + - requried when I(state) is 'present' + required: false name: description: - The name of the subnet that should be created. Although Neutron @@ -52,8 +53,8 @@ options: cidr: description: - The CIDR representation of the subnet that should be assigned to - the subnet. - required: true when state is 'present' + the subnet. Required when I(state) is 'present' + required: false default: None ip_version: description: diff --git a/lib/ansible/modules/cloud/openstack/os_user.py b/lib/ansible/modules/cloud/openstack/os_user.py index af6bd0c5bc..d40372990c 100644 --- a/lib/ansible/modules/cloud/openstack/os_user.py +++ b/lib/ansible/modules/cloud/openstack/os_user.py @@ -41,7 +41,8 @@ options: password: description: - Password for the user - required: true when I(state) is present + - Required when I(state) is present + required: false default: None email: description: