Hi Tim,

that is what I actually did, 

so thanks

Peter

On Thursday, January 15, 2015 at 1:00:20 PM UTC-8, Timothy Gerla wrote:
>
> Hi Peter,
>
> I've found that when you start wanting to invoke sections of a role 
> independently, that's usually the time that you should break that role up 
> into multiple separate roles. This makes reuse and separate execution much 
> easier. You can have a structure that looks like this, too:
>
> roles/aws/net/tasks/main.yml
> roles/aws/vm/tasks/main.yml
> ...for nice nested organization of roles.
>
> You can then call the roles individually, and if you need to, use role 
> dependencies to enforce one to run before another.
>
> Hope this helps,
>
> -Tim
>
> On Thu, Jan 15, 2015 at 12:33 PM, Peter Mooshammer <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> I have a role that does everything to standup a server on aws - create a 
>> network and provision a VM. But sometimes I only want to run only the part 
>> that deploys a new server.
>>
>> Currently I simple include these sub-tasks in a playbook, which I don't 
>> really like:
>>
>>   tasks:
>>     # should be called as a role, but only parts of it ...
>>   - include: aws/tasks/provision-net.yml
>>   - include: aws/tasks/provision-vm.yml
>>
>> thanks
>>
>>
>>

-- 
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/bd2cd493-5c1f-4157-8771-256bf5413865%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to