Artur Martins
2015-07-13 16:10:48 UTC
Hello there,
I am trying to understand why the linode creation does not work. I am using
this ansible template:
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Create linode server
linode:
api_key: '---LINODE-API-KEY-HERE---'
name: linodeserver
plan: 1 #cheapest
datacenter: 6 #newmark NJ
distribution: 127 #centos 6.5
password: '-AUX-PASSWORD-HERE'
ssh_pub_key: 'ssh-rsa AAAAB3NzaC----RSA HERE-----'
wait: yes
wait_timeout: 300
state: present
register: linode
- name: Adding the new box to the dynamic inventory
add_host: hostname="{{ linode.instance.ipv4 }}" groupname=linodehosts
- name: Wait for SSH to come up
local_action: wait_for host="{{ linode.instance.ipv4 }}" port=22 delay=60 timeout=320 state=started
*based on https://gist.github.com/vicendominguez/805fb9f5426083a7ab05#file-ansible-linode-template-yml*
I run the playbook with the following command: *ansible-playbook
ansible-linode-template.yml*
Output:
PLAY [localhost]
**************************************************************
TASK: [Create linode server]
**************************************************
failed: [localhost] => {"failed": true, "parsed": false}
[test_echo]* The requested class does not exist*Traceback (most recent call
last):
File
"/home/user/.ansible/tmp/ansible-tmp-1436802938.49-243880221068828/linode",
line 2098, in <module>
main()
File
"/home/user/.ansible/tmp/ansible-tmp-1436802938.49-243880221068828/linode",
line 485, in main
module.fail_json(msg = '%s' % e.value[0]['ERRORMESSAGE'])
*AttributeError: 'LinodeException' object has no attribute 'value'*
Any ideas what I am doing wrong here?
Does anyone did ever create Linode servers successfully?
Any help would be extremely appreciated.
Cheers,
Artur
--
HQ - Ferry House, 48 Lower Mount Street, Dublin 2, Ireland
NYC - 1185 Avenue of the Americas, 23rd Floor, New York, NY 10036, USA
Hong Kong - Level 25, Central Plaza, 18 Harbour Road, Wan Chai, Hong Kong
SAR
Storyful powers great storytelling
This e-mail and any attachments are confidential, may be legally privileged
and are the property of Storyful Limited on whose systems they were
generated. Storyful Limited is registered in Ireland under number 478477,
has its registered office at Ferry House, 48 Lower Mount Street, Dublin 2,
Ireland. If you have received this e-mail in error, please notify the
sender immediately and do not use, distribute, store or copy it in any way.
Statements or opinions in this e-mail or any attachment are those of the
author and are not necessarily agreed or authorised by Storyful Limited.
Storyful Limited may monitor outgoing or incoming emails as permitted by
law. It accepts no liability for viruses introduced by this e-mail or
attachments.
I am trying to understand why the linode creation does not work. I am using
this ansible template:
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Create linode server
linode:
api_key: '---LINODE-API-KEY-HERE---'
name: linodeserver
plan: 1 #cheapest
datacenter: 6 #newmark NJ
distribution: 127 #centos 6.5
password: '-AUX-PASSWORD-HERE'
ssh_pub_key: 'ssh-rsa AAAAB3NzaC----RSA HERE-----'
wait: yes
wait_timeout: 300
state: present
register: linode
- name: Adding the new box to the dynamic inventory
add_host: hostname="{{ linode.instance.ipv4 }}" groupname=linodehosts
- name: Wait for SSH to come up
local_action: wait_for host="{{ linode.instance.ipv4 }}" port=22 delay=60 timeout=320 state=started
*based on https://gist.github.com/vicendominguez/805fb9f5426083a7ab05#file-ansible-linode-template-yml*
I run the playbook with the following command: *ansible-playbook
ansible-linode-template.yml*
Output:
PLAY [localhost]
**************************************************************
TASK: [Create linode server]
**************************************************
failed: [localhost] => {"failed": true, "parsed": false}
[test_echo]* The requested class does not exist*Traceback (most recent call
last):
File
"/home/user/.ansible/tmp/ansible-tmp-1436802938.49-243880221068828/linode",
line 2098, in <module>
main()
File
"/home/user/.ansible/tmp/ansible-tmp-1436802938.49-243880221068828/linode",
line 485, in main
module.fail_json(msg = '%s' % e.value[0]['ERRORMESSAGE'])
*AttributeError: 'LinodeException' object has no attribute 'value'*
Any ideas what I am doing wrong here?
Does anyone did ever create Linode servers successfully?
Any help would be extremely appreciated.
Cheers,
Artur
--
HQ - Ferry House, 48 Lower Mount Street, Dublin 2, Ireland
NYC - 1185 Avenue of the Americas, 23rd Floor, New York, NY 10036, USA
Hong Kong - Level 25, Central Plaza, 18 Harbour Road, Wan Chai, Hong Kong
SAR
Storyful powers great storytelling
This e-mail and any attachments are confidential, may be legally privileged
and are the property of Storyful Limited on whose systems they were
generated. Storyful Limited is registered in Ireland under number 478477,
has its registered office at Ferry House, 48 Lower Mount Street, Dublin 2,
Ireland. If you have received this e-mail in error, please notify the
sender immediately and do not use, distribute, store or copy it in any way.
Statements or opinions in this e-mail or any attachment are those of the
author and are not necessarily agreed or authorised by Storyful Limited.
Storyful Limited may monitor outgoing or incoming emails as permitted by
law. It accepts no liability for viruses introduced by this e-mail or
attachments.
--
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 ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f53d95a9-40e1-4827-ae6e-bc0fa2954a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f53d95a9-40e1-4827-ae6e-bc0fa2954a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.