diff --git a/lib/ansible/module_utils/gcp.py b/lib/ansible/module_utils/gcp.py index 91c32d58baf..3e662d3bf14 100644 --- a/lib/ansible/module_utils/gcp.py +++ b/lib/ansible/module_utils/gcp.py @@ -240,11 +240,11 @@ def _validate_credentials_file(module, credentials_file, require_valid_json=True 'Upgrade to libcloud>=0.17.0.') return True except IOError as e: - module.fail_json(msg='GCP Credentials File %s not found.', changed=False) + module.fail_json(msg='GCP Credentials File %s not found.' % credentials_file, changed=False) return False except ValueError as e: if require_valid_json: - module.fail_json(msg='GCP Credentials File %s invalid. Must be valid JSON.', changed=False) + module.fail_json(msg='GCP Credentials File %s invalid. Must be valid JSON.' % credentials_file, changed=False) else: display.deprecated(msg=("Non-JSON credentials file provided. This format is deprecated. " " Please generate a new JSON key from the Google Cloud console"), diff --git a/lib/ansible/modules/cloud/google/gce.py b/lib/ansible/modules/cloud/google/gce.py index b89be8dba2e..6c95b6eeb81 100644 --- a/lib/ansible/modules/cloud/google/gce.py +++ b/lib/ansible/modules/cloud/google/gce.py @@ -637,8 +637,8 @@ def main(): zone = dict(default='us-central1-a'), service_account_email = dict(), service_account_permissions = dict(type='list'), - pem_file = dict(), - credentials_file = dict(), + pem_file = dict(type='path'), + credentials_file = dict(type='path'), project_id = dict(), ip_forward = dict(type='bool', default=False), external_ip=dict(default='ephemeral'),