I am trying to create some servers on one of my datacenters using ansible (2.0) with a modified sample yml playbook, but I am getting an error I can not figure out.
pb_create_servers.yml:
- profitbricks:
subscription_user: my-email-username
subscription_passsword: my-password
datacenter: Ansible Moodle
name: web%02d.myserver.com
cores: 2
ram: 2048
volume_size: 10
image: a3eae284-a2fe-11e4-b187-5f1f641608c8
location: de/fra
count: 2
assign_public_ip: true
And the error I am getting:
ERROR! 'profitbricks' is not a valid attribute for a Play
Please help
Looks like working.
Due to the latest changes of the profitbricks image system with ssh keys (https://devops.profitbricks.com/api/cloud/v2/) there is an issue as the key attribute is not available in the current ansible module yet.
At least I get the error: fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "unsupported parameter for module: sshKeys"}
Or fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "failed to create the new volume: (422, u'[(root).properties.image] Passwords/SSH Keys are mandatory for public ProfitBricks Images.')"}
without.