Last active
August 29, 2015 14:00
-
-
Save fifthecho/fef7b18b2d1aaeac20af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
module = AnsibleModule( | |
argument_spec=dict( | |
access_key=dict(), | |
secret_key=dict(), | |
api_url=dict(default='http://localhost:8080/client/api'), | |
key_name=dict(aliases=['keypair']), | |
security_groups=dict(default=None), | |
networks=dict(default=None), | |
wait=dict(default='yes', choices=['yes', 'no']), | |
wait_for=dict(default=30), | |
state=dict(default='present', choices=['absent', 'present']), | |
user_data=dict(), | |
template_id=dict(required=True), | |
size_id=dict(aliases=['flavor_id', 'service_offering_id'], required=True), | |
zone_id=dict(required=True), | |
), | |
) | |
connection = initialize_connection(module) | |
if module.params['state'] == 'present': | |
create_instances(connection, module) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible localhost -m cloudstack -a "keyname=jmoody_fifthecho security_groups=[129,324] zone_id=5 size_id=44 template_id=85d5a794-c3f4-49fd-afee-19132a850f79 state=present" -c local | |
localhost | FAILED >> { | |
"failed": true, | |
"msg": "this module requires key=value arguments (['<<INCLUDE_ANSIBLE_MODULE_ARGS>>'])" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having the same issue right now. Did you solve this?