Skip to content
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

Call Refactored login from snow modules #59201

Merged
merged 4 commits into from
Jul 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/ansible/module_utils/service_now.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-

# Copyright: (c) 2019, Ansible Project
# Copyright: (c) 2017, Tim Rightnour <thegarbledone@gmail.com>
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
Expand Down Expand Up @@ -87,7 +88,7 @@ def updater(self, new_token):
def snow_argument_spec():
return dict(
instance=dict(type='str', required=True),
username=dict(type='str', required=True, no_log=True),
username=dict(type='str', required=True),
password=dict(type='str', required=True, no_log=True),
client_id=dict(type='str', no_log=True),
client_secret=dict(type='str', no_log=True),
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/notification/snow_record.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright: (c) 2017, Tim Rightnour <thegarbledone@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

Expand Down Expand Up @@ -200,6 +202,7 @@ def run_module():

# Connect to ServiceNow
service_now_client = ServiceNowClient(module)
service_now_client.login()
conn = service_now_client.conn

params = module.params
Expand Down
3 changes: 3 additions & 0 deletions lib/ansible/modules/notification/snow_record_find.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright: (c) 2017, Tim Rightnour <thegarbledone@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

Expand Down Expand Up @@ -227,6 +229,7 @@ def run_module():

# Connect to ServiceNow
service_now_client = ServiceNowClient(module)
service_now_client.login()
conn = service_now_client.conn

params = module.params
Expand Down