Skip to content

Commit

Permalink
all fields are optional
Browse files Browse the repository at this point in the history
  • Loading branch information
markramach committed Jan 17, 2017
1 parent e371d3c commit f26e128
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clc_ansible_module/clc_meta_fact.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def _set_clc_credentials_from_env(self):

def process_request(self):
params = self.module.params
criteria = ' referenceId: "' + params.get('referenceId') + '" '
criteria = ''
if params.get('referenceId'):
criteria += ' referenceId: "' + params.get('referenceId') + '" '
if params.get('jobId'):
criteria += ' jobId: "' + params.get('jobId') + '" '
if params.get('executionId'):
Expand Down Expand Up @@ -89,7 +91,7 @@ def _define_module_argument_spec():
argument_spec = dict(
jobId=dict(required=False, default=False),
executionId=dict(required=False, default=False),
referenceId=dict(required=True),
referenceId=dict(required=False, default=False),
name=dict(required=False, default=False))

return {"argument_spec": argument_spec}
Expand Down

0 comments on commit f26e128

Please sign in to comment.