- name: Create a sandbox instance
hosts: localhost
connection: local
vars:
names: foo,bar
machine_type: f1-micro
image: centos-6-v20131120
zone: us-central1-a
tasks:
- name: Launch instances
local_action: gce machine_type={{machine_type}} image={{image}} zone={{zone}}
The error I get is "AttributeError: 'exceptions.ValueError' object has no attribute 'http_code'"
The full output is below:
PLAY [Create a sandbox instance] **********************************************
GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
<127.0.0.1> REMOTE_MODULE setup
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1391701320.38-99585849597022 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1391701320.38-99585849597022 && echo $HOME/.ansible/tmp/ansible-tmp-1391701320.38-99585849597022']
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1391701320.39-156688493018489 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1391701320.39-156688493018489 && echo $HOME/.ansible/tmp/ansible-tmp-1391701320.39-156688493018489']
<localhost> PUT /var/folders/j6/q_tyq95n1zzf_v68908mpxy40000gn/T/tmpZVDeOO TO /Users/warren/.ansible/tmp/ansible-tmp-1391701320.38-99585849597022/setup
<localhost> EXEC ['/bin/sh', '-c', '/usr/bin/python /Users/warren/.ansible/tmp/ansible-tmp-1391701320.38-99585849597022/setup; rm -rf /Users/warren/.ansible/tmp/ansible-tmp-1391701320.38-99585849597022/ >/dev/null 2>&1']
<127.0.0.1> PUT /var/folders/j6/q_tyq95n1zzf_v68908mpxy40000gn/T/tmp6yDJfN TO /Users/warren/.ansible/tmp/ansible-tmp-1391701320.39-156688493018489/setup
<127.0.0.1> EXEC ['/bin/sh', '-c', '/usr/bin/python /Users/warren/.ansible/tmp/ansible-tmp-1391701320.39-156688493018489/setup; rm -rf /Users/warren/.ansible/tmp/ansible-tmp-1391701320.39-156688493018489/ >/dev/null 2>&1']
ok: [127.0.0.1]
ok: [localhost]
TASK: [Launch instances] ******************************************************
<127.0.0.1> REMOTE_MODULE gce machine_type=f1-micro image=centos-6-v20131120 zone=us-central1-a
<127.0.0.1> REMOTE_MODULE gce machine_type=f1-micro image=centos-6-v20131120 zone=us-central1-a
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431 && echo $HOME/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431']
<127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167 && echo $HOME/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167']
<127.0.0.1> PUT /var/folders/j6/q_tyq95n1zzf_v68908mpxy40000gn/T/tmpskK1WM TO /Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167/gce
<127.0.0.1> PUT /var/folders/j6/q_tyq95n1zzf_v68908mpxy40000gn/T/tmp1KTB82 TO /Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431/gce
<127.0.0.1> EXEC ['/bin/sh', '-c', '/usr/bin/python /Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167/gce; rm -rf /Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167/ >/dev/null 2>&1']
<127.0.0.1> EXEC ['/bin/sh', '-c', '/usr/bin/python /Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431/gce; rm -rf /Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431/ >/dev/null 2>&1']
failed: [127.0.0.1] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431/gce", line 1462, in <module>
main()
File "/Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431/gce", line 376, in main
module.fail_json(msg=unexpected_error_msg(e), changed=False)
File "/Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-214772578621431/gce", line 191, in unexpected_error_msg
error.http_code, error.code, str(error.value))
AttributeError: 'exceptions.ValueError' object has no attribute 'http_code'
failed: [localhost] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167/gce", line 1462, in <module>
main()
File "/Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167/gce", line 376, in main
module.fail_json(msg=unexpected_error_msg(e), changed=False)
File "/Users/warren/.ansible/tmp/ansible-tmp-1391701320.97-169496415593167/gce", line 191, in unexpected_error_msg
error.http_code, error.code, str(error.value))
AttributeError: 'exceptions.ValueError' object has no attribute 'http_code'
FATAL: all hosts have already failed -- aborting
openssl pkcs12 -in 968bebd2b23ddd47d1dbead594f0536ee98b9670-privatekey.p12 -passin pass:notasecret -nodes -nocerts | openssl rsa -out gce.pem
msg: No CA Certificates were found in CA_CERTS_PATH. For information on how to get required certificate files, please visit https://libcloud.readthedocs.org/en/latest/other/ssl-certificate-validation.html -
So it looks I have some issue with the certificate.
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/WTef9t1TyA0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.