Hello,

I'm trying to use the GCE module, but so far, I'm not very lucky.

What I have done:
1. I registered a new "service app" on my google cloud console, and 
downloaded the generated private key, in pkcs2 format.
2. Created a file secrets.py looking like following, and put it in some 
folder which is in my PYTHONPATH
---
GCE_PARAMS = ('[email protected]', 'secret')
GCE_KEYWORD_PARAMS = {'project': 'project-name'}
---

3. Converted my private key in RSA format
4. Created a playbook looking like following
---
- hosts: localhost
  tasks:
  - local_action:
      module: gce
      name: test-instance
      zone: europe-west1-b
      machine_type: f1-micro
      image: debian-7
---

But when I tried to run my playbook, I've :
---
failed: [127.0.0.1] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-1389289770.6-124236068572659/gce", line 
1446, in <module>
    main()
  File "/root/.ansible/tmp/ansible-1389289770.6-124236068572659/gce", line 
376, in main
    module.fail_json(msg=unexpected_error_msg(e), changed=False)
  File "/root/.ansible/tmp/ansible-1389289770.6-124236068572659/gce", line 
190, in unexpected_error_msg
    error.http_code, error.code, str(error.value))
AttributeError: 'exceptions.ValueError' object has no attribute 'http_code'
---

That's a bug of the module, on /usr/share/ansible/cloud/gce at line 190 it 
tries to use error.http_code and error.code which don't exist.
So OK, I just printed error, and here is my error: RSA key format is not 
supported

But the fact is, even if I have my private key from Google, I've no idea 
where to put it. In git/plugins/inventory/gce.ini there is a variable 
called: gce_service_account_pem_file_path =
But I don't know how to override it.

So, do someone know how to set the good location for my private key?

And also, the error that ansible returns me, "RSA key format is not 
supported". I think it comes directly from the GCE driver, so is it still 
good to use the RSA formated private key?


-- 
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to