From cc2eecc247aaa046410d2ca3eec359bef3809f94 Mon Sep 17 00:00:00 2001 From: Johannes Kohnen Date: Fri, 10 Mar 2017 11:31:18 +0100 Subject: [PATCH] Enable path expansion in GCE modules This is basically a replay of #16064 from `gce.py` to other pertinent `gce_*.py` files. It enables expansions of paths in `gce.ini` like `~/.project.json` --- lib/ansible/modules/cloud/google/gce_eip.py | 4 ++-- lib/ansible/modules/cloud/google/gce_lb.py | 4 ++-- lib/ansible/modules/cloud/google/gce_mig.py | 4 ++-- lib/ansible/modules/cloud/google/gce_net.py | 4 ++-- lib/ansible/modules/cloud/google/gce_pd.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/ansible/modules/cloud/google/gce_eip.py b/lib/ansible/modules/cloud/google/gce_eip.py index e106d89dc5..b856466f47 100644 --- a/lib/ansible/modules/cloud/google/gce_eip.py +++ b/lib/ansible/modules/cloud/google/gce_eip.py @@ -179,8 +179,8 @@ def main(): region=dict(required=True), 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(), ), ) if not HAS_PYTHON26: diff --git a/lib/ansible/modules/cloud/google/gce_lb.py b/lib/ansible/modules/cloud/google/gce_lb.py index 7815102b81..6243e307b9 100644 --- a/lib/ansible/modules/cloud/google/gce_lb.py +++ b/lib/ansible/modules/cloud/google/gce_lb.py @@ -193,8 +193,8 @@ def main(): members = dict(type='list'), state = dict(default='present'), service_account_email = dict(), - pem_file = dict(), - credentials_file = dict(), + pem_file = dict(type='path'), + credentials_file = dict(type='path'), project_id = dict(), ) ) diff --git a/lib/ansible/modules/cloud/google/gce_mig.py b/lib/ansible/modules/cloud/google/gce_mig.py index a05c32860b..7e4046ab3a 100644 --- a/lib/ansible/modules/cloud/google/gce_mig.py +++ b/lib/ansible/modules/cloud/google/gce_mig.py @@ -721,8 +721,8 @@ def main(): named_ports=dict(type='list', default=None), 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(), ), ) if not HAS_PYTHON26: diff --git a/lib/ansible/modules/cloud/google/gce_net.py b/lib/ansible/modules/cloud/google/gce_net.py index 88b18f657f..4d75793a71 100644 --- a/lib/ansible/modules/cloud/google/gce_net.py +++ b/lib/ansible/modules/cloud/google/gce_net.py @@ -329,8 +329,8 @@ def main(): target_tags = dict(type='list'), state = dict(default='present'), service_account_email = dict(), - pem_file = dict(), - credentials_file = dict(), + pem_file = dict(type='path'), + credentials_file = dict(type='path'), project_id = dict(), mode = dict(default='legacy', choices=['legacy', 'auto', 'custom']), subnet_name = dict(), diff --git a/lib/ansible/modules/cloud/google/gce_pd.py b/lib/ansible/modules/cloud/google/gce_pd.py index 7d0e7237db..d1f7fc0e12 100644 --- a/lib/ansible/modules/cloud/google/gce_pd.py +++ b/lib/ansible/modules/cloud/google/gce_pd.py @@ -176,8 +176,8 @@ def main(): state = dict(default='present'), zone = dict(default='us-central1-b'), service_account_email = dict(), - pem_file = dict(), - credentials_file = dict(), + pem_file = dict(type='path'), + credentials_file = dict(type='path'), project_id = dict(), ) )