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.
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
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.
- user_groups:
- sysadmin
- user_groups:
- development
No no, I meant overriding variables. In this case, the variable "user_groups" is an array of the groups that the role "users" has to install in each machine, and it doesn't inherit from all the "sysadmin" group.
I need to know if there is something similar to achieve hierarchies of inheritance for variables.
Or a big sample project. I need to understand how stuff is structured, because I find it like too linear atm, not allowing to specify that some machines have different properties makes harder to me to understand the abstraction layers.
I mean not being able to specify exceptions without having them be executed twice. (once for all and another for the specific case).
I understand is because of the knowledge I have and that I am accustomed to puppet, so any example on how to structure a big project would be really helpful. I aim to control everything with ansible, from users, configuration, installed programs, iptables rules, applications deployed, etc.
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.
I would be glad if someone could help me understand how to correctly structure Ansible code for my use case.