diff --git a/awx_collection/plugins/modules/credential.py b/awx_collection/plugins/modules/credential.py index e43e59ae63..dba0b196b7 100644 --- a/awx_collection/plugins/modules/credential.py +++ b/awx_collection/plugins/modules/credential.py @@ -257,6 +257,8 @@ def main(): copy_lookup_data = lookup_data if organization: lookup_data['organization'] = org_id + if user: + lookup_data['organization'] = None credential = module.get_one('credentials', name_or_id=name, check_exists=(state == 'exists'), **{'data': lookup_data})