diff --git a/plugins/modules/cml_lab_facts.py b/plugins/modules/cml_lab_facts.py index 6cd7c61..e6f6160 100644 --- a/plugins/modules/cml_lab_facts.py +++ b/plugins/modules/cml_lab_facts.py @@ -61,14 +61,14 @@ var: results """ -from ansible.module_utils.basic import AnsibleModule +from ansible.module_utils.basic import AnsibleModule, env_fallback from ansible_collections.cisco.cml.plugins.module_utils.cml_utils import cmlModule, cml_argument_spec def run_module(): # define available arguments/parameters a user can pass to the module argument_spec = cml_argument_spec() - argument_spec.update(lab=dict(type='str', required=True), ) + argument_spec.update(lab=dict(type='str', required=True, fallback=(env_fallback, ['CML_LAB'])), ) # the AnsibleModule object will be our abstraction working with Ansible # this includes instantiation, a couple of common attr would be the