New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snow_record support for environment variables #49669

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
2 participants
@ekultails
Copy link
Contributor

ekultails commented Dec 7, 2018

SUMMARY

This update allows the instance, username, and password to be specified via these environment variables: SN_INSTANCE, SN_USERNAME, and SN_PASSWORD. This removes the need to constantly redefine these as arguments within multiple snow_record tasks.

Values provided as arguments to the module take precedence over the environment variables.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

snow_record module

ADDITIONAL INFORMATION

These environment variables also mirror the names used for the ansible-sn-inventory dynamic inventory script for consistency.

I have tested this with only environment variables, module arguments, and a mix. It has been working as intended.

ekultails added some commits Dec 6, 2018

snow_record: Support using shell environment variables for authentica…
…tion.

These are the same variables used by the
ansible-sn-inventory script.
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 7, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Dec 7, 2018

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

lib/ansible/modules/notification/snow_record.py:207:37: ansible-format-automatic-specification Format string contains automatic field numbering specification
lib/ansible/modules/notification/snow_record.py:215:33: too-many-format-args Too many arguments for format string

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

test/sanity/validate-modules/ignore.txt:734:1: A102 Remove since "lib/ansible/modules/notification/snow_record.py" passes "E317" test

click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment