From 8b60fb71810f7545316b7cbbf7753e9f598f41d2 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Mon, 19 Jan 2015 13:08:56 -0600 Subject: [PATCH] Remove unnecessary required arg logic, and remove 'absent' as a valid choice since it isn't implemented --- lib/ansible/modules/cloud/rackspace/rax_identity.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/ansible/modules/cloud/rackspace/rax_identity.py b/lib/ansible/modules/cloud/rackspace/rax_identity.py index ea40ea2ef4..47b4cb60cf 100644 --- a/lib/ansible/modules/cloud/rackspace/rax_identity.py +++ b/lib/ansible/modules/cloud/rackspace/rax_identity.py @@ -55,10 +55,6 @@ except ImportError: def cloud_identity(module, state, identity): - for arg in (state, identity): - if not arg: - module.fail_json(msg='%s is required for rax_identity' % arg) - instance = dict( authenticated=identity.authenticated, credentials=identity._creds_file @@ -79,7 +75,7 @@ def main(): argument_spec = rax_argument_spec() argument_spec.update( dict( - state=dict(default='present', choices=['present', 'absent']) + state=dict(default='present', choices=['present']) ) ) @@ -95,7 +91,7 @@ def main(): setup_rax_module(module, pyrax) - if pyrax.identity is None: + if not pyrax.identity: module.fail_json(msg='Failed to instantiate client. This ' 'typically indicates an invalid region or an ' 'incorrectly capitalized region name.') @@ -106,5 +102,5 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.rax import * -### invoke the module +# invoke the module main()