Nobody else ? :(
Le mardi 19 janvier 2016 12:20:18 UTC+1, Sylvain a écrit :
>
> Thanks for your reply.
>
> My play run already on *localhost*. If I don't use *delegate_to*, this
> will be hard to make actions on servers.
>
> My roles are parametrized to take server in parameters among others so my
> roles are already reusable but I'm ok to say that it will be more clean to
> suppress *delegate_to* directives for each tasks in my roles.
> So I must find a way to respect my philosophy to think services and not
> servers : I want do know easily what's the service's dependancies (which
> servers ? which databases names ? which users ? and so on).
>
> Another plan to follow the principe of "a play is to map a group of hosts
> to some well defined roles" :
> - I remove *delegate_to* from roles
> - I specify in my playbook for each host, which roles and which params
> the service need
>
> Like this, I must specify *apache* and *mysql* roles on my playbook so I
> no longer use dependancies in *roles/wordpress/meta/*.
> Too bad, It was a great usage of this functionnality I think.
>
> If I disregard theses considerations and for one wordpress instance : why
> not ?
> But if I want more and know easily what is the service's dependancies, I
> must make lot of cut and paste. It's not nice (In first solution, I have
> only one line { role : wordpress ; db_server : bdd1 , ... }
> If I made one playbook for one instance, it will be more readable but
> there will be too copy and paste for me.
>
> Have another point of view or idea to stay with Ansible's philosophy ?
>
> Sylvain
>
> Le mardi 19 janvier 2016 02:30:25 UTC+1, Brian Coca a écrit :
>>
>> i would say that to make your roles more reusable, don't use
>> delegate_to but set the play to localhost or connection=local.
>>
>> --
>> Brian Coca
>>
>
>
--
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/b10082be-42e9-4905-a238-7edf9babc22b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.