diff --git a/lib/ansible/module_utils/service_now.py b/lib/ansible/module_utils/service_now.py index ab395ebcdd..18b25fab54 100644 --- a/lib/ansible/module_utils/service_now.py +++ b/lib/ansible/module_utils/service_now.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- + # Copyright: (c) 2019, Ansible Project # Copyright: (c) 2017, Tim Rightnour # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) @@ -87,7 +88,7 @@ class ServiceNowClient(object): 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), diff --git a/lib/ansible/modules/notification/snow_record.py b/lib/ansible/modules/notification/snow_record.py index c94b3cdf20..af21b18c31 100644 --- a/lib/ansible/modules/notification/snow_record.py +++ b/lib/ansible/modules/notification/snow_record.py @@ -1,4 +1,6 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- + # Copyright: (c) 2017, Tim Rightnour # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) @@ -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 diff --git a/lib/ansible/modules/notification/snow_record_find.py b/lib/ansible/modules/notification/snow_record_find.py index 5ea03aa934..a9de154623 100644 --- a/lib/ansible/modules/notification/snow_record_find.py +++ b/lib/ansible/modules/notification/snow_record_find.py @@ -1,4 +1,6 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- + # Copyright: (c) 2017, Tim Rightnour # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) @@ -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