So I plan to use a static and a dynamic inventory (gce) and this is what my 
play folder looks like:

├── ansible.cfg
├── credentials.json
├── gce_vars
│   ├── auth
│   └── test_servers
├── group_vars
│   └── all
├── hosts.yml
├── inventory
│   ├── gce.ini
│   ├──
│   └── hosts.yml
└── provision.yml

3 directories, 10 files

credentials.json is the json private key for my service account.

[root@workstation gcloud]# cat gce_vars/auth
service_account_email: ""
path_to_credentials: /workspace/gcloud/credentials.json
project_id: "heroic-XXX-XXX"


libcloud_secrets =
gce_service_account_email_address = XXXXX-compute@developer.gserviceaccount.
gce_service_account_pem_file_path = /workstation/gcloud/credentials.json
gce_project_id = heroic-XXX-XXX

inventory_ip_type = external

cache_path = ~/.ansible/tmp
cache_max_age = 300

However, when I try to run the dynamic inventory, I get this error:

[root@workstation inventory]# ./ --list
Traceback (most recent call last):
  File "./", line 508, in <module>
  File "./", line 170, in __init__
    self.driver = self.get_gce_driver()
  File "./", line 318, in get_gce_driver
    gce = get_driver(Provider.GCE)(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/", 
line 1795, in __init__
    super(GCENodeDriver, self).__init__(user_id, key, **kwargs)
  File "/usr/lib/python2.7/site-packages/libcloud/common/", line 
975, in __init__
    self.connection = self.connectionCls(*args, **conn_kwargs)
  File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/", 
line 99, in __init__
    credential_file=credential_file, **kwargs)
  File "/usr/lib/python2.7/site-packages/libcloud/common/", line 
767, in __init__
    user_id, key, auth_type, credential_file, scopes, **kwargs)
  File "/usr/lib/python2.7/site-packages/libcloud/common/", line 
653, in __init__
    self.user_id, self.key, self.scopes, **kwargs)
  File "/usr/lib/python2.7/site-packages/libcloud/common/", line 
495, in __init__
    "file: '%s'" % key)
ValueError: Missing (or not readable) key file: 

You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

Reply via email to