![]() ![]() Binary configuration files do not lend themselves well to system automation, so any kind of binary format will give you trouble and will likely require you to create a program to handle the configuration. There's a reason for the Unix tradition of using plain text configuration files. ![]() Since you mention XML configuration files, I take the opportunity to do some whining. If the software being configured does not offer this functionality, you may be in trouble. I believe that it is not the philosophy of Ansible to do what you have in mind, but instead to use the conf.d trick. The reason more and more software offers the feature to read configuration snippets from a conf.d directory is to enable such automation systems to have different packages/roles add configuration to the software. The advantage of this approach is that you don't need to set exact lists of variable names, but only the pattern and user can set it dynamically.Īnsible is an automation system, and, concerning configuration file management, it's not very different from apt. I guess it would be also possible to merge all variables dictionary_of_bla.* into one dictionary during runtime using the same lookup. ![]() Note: lookup('varnames','') is available since ansible 2.8 It's just a snippet, but you should get the idea how it works. I know you can do something like: - name: this is a hack Is there any better way to append to a list or add a key to a dictionary in Ansible than (ab)using a jina2 template expression? (Related to Callbacks or hooks, and reusable series of tasks, in Ansible roles): ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |