Skip to content

Commit

Permalink
Merge pull request #480 from netgirard/support_env_fallback
Browse files Browse the repository at this point in the history
Add support for environment varible fallback to all modules
  • Loading branch information
joewesch authored Jan 8, 2025
2 parents 5f654f4 + f3219fd commit fe69ccb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/module_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from ansible.module_utils.common.text.converters import to_text

from ansible.module_utils.basic import missing_required_lib
from ansible.module_utils.basic import missing_required_lib, env_fallback
from ansible.module_utils.urls import open_url

PYNAUTOBOT_IMP_ERR = None
Expand Down Expand Up @@ -535,8 +535,8 @@


NAUTOBOT_ARG_SPEC = dict(
url=dict(type="str", required=True),
token=dict(type="str", required=True, no_log=True),
url=dict(type="str", required=True, fallback=(env_fallback, ["NAUTOBOT_URL"])),
token=dict(type="str", required=True, no_log=True, fallback=(env_fallback, ["NAUTOBOT_TOKEN"])),
state=dict(required=False, default="present", choices=["present", "absent"]),
query_params=dict(required=False, type="list", elements="str"),
validate_certs=dict(type="raw", default=True),
Expand Down

0 comments on commit fe69ccb

Please sign in to comment.