One last questions. I learnt how to add new values (ex. devs can
access dev), but how may I selectively use merge or not strategy?

I mean, I want overrides on user_groups vars, but not in all of them.
In puppet it exists lookup_array, lookup_hash for merges, and
lookup_hiera for overriding.

For example,
--- groups_all
- users_groups:
  - sysadmin
--- groups_dev
- users_groups:
  - devs

lookup_hiera(users_groups) => ['devs']
lookup_array(users_groups) => ['devs', 'sysadmin']

So that I can choose to locally use some merge configs.

Thanks for the tips btw, I found strange the names but just because of
not being used to =)


On Sun, Sep 21, 2014 at 9:37 PM, Michael DeHaan <[email protected]> wrote:
>
>
> On Fri, Sep 19, 2014 at 12:58 PM, Javier Domingo Cansino
> <[email protected]> wrote:
>>
>> Hello,
>>
>> First of all, I am coming from puppet. I have already done some
>> experiments with ansible, and created a user management module, mainly to
>> create the root Authkeys file. This was a little approach to see how
>> overrides etc are handled by ansible.
>>
>> The result was having the module executed twice, one for the general case
>> and the other for the specific one. Because of this, I wondered whether it
>> would be possible to have overrides correctly done.
>>
>> I have read a thread asking for Ansible's hiera, and for what I
>> understood, you proposed using lookups and external inventories. I see
>> ansible has a different way to do stuff, but I don't understand how this
>> sort of features would provide such flexibility.
>
>
> Yeah, you don't want.
>
> That is a confusing overdesigned hack to patch over something Puppet
> couldn't do well originally, and something that Ansible was designed for
> early on.
>
> Ansible provides all the group and inventory management *out of the box*,
> actually.
>
> group_vars, host_vars, etc, all required without using an external tool.
>
>
>
>>
>>
>> I would be glad if someone could help me understand how to correctly
>> structure Ansible code for my use case.
>>
>> --
>> 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/926c5154-0a4e-4a96-95c2-9ecf09ba95f1%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/EuLmmfwZmAo/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CA%2BnsWgxg9XvCS4eEMvKPVDCuMPmYDn42MWSuERG-JoW2B83ckw%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Javier Domingo Cansino

-- 
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/CALZVap%3Du6NRVweWSPrc1G%3Dq2zTFUGpRsdNJBUJAxiTuUomoyYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to