I want to automate the complete deployment in cloud with ansible. The Role 
should create a host in cloud before the deployment starts.
The Problem is: One cannot use `local_action` in roles. How do you manage 
it?

I 'd like to use something like

#myrole/tasks/prepare.yml

- local_action:
 module: cs_instance
 name: {{ instance_name }}
 iso: Linux Debian 7 64-bit
 hypervisor: VMware
 project: Integration
 zone: {{ instance_zone }}
 service_offering: 1cpu_1gb
 disk_offering: {{ disk_offer }}
 disk_size: 20
 networks:
 - Server Integration
 - Sync Integration
 - Storage Integration

#myrole/tasks/main.yml

- include: prepare.yml

- name: create users
  user:
  ......



And define all the variables in `host_vars` (already before the host is 
created). Is there any way to do this?

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0489d334-e787-43e8-95a5-fd8d27d6570a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to