i want to create some reg entries and i want to pull data and value for it from an url…where i can edit those whenever required and when there is a change there , ansible should pick it and enter that in registry…is it possible? sorry i am new to ansible…
There are a lot of options here.
I suggest you try to create a playbook and then ask specific questions when you find part of it that you can’t get working.
All the best,
Jon
the problem is i dont even know the existence of such options
Sounds like you might do well to read about win_regedit module, win_regnerge module, creating templates, and possibly ansible-pull.
A description of the problem you are trying to solve might help others make some more specific suggestions.
Jon
Ping…any replies on how can i achieve this?
is the forum alive? i can see most of the questions unanswered…
The group is still alive, you would find most people don't work on a weekend hence the unanswered questions. I haven't looked too closely at your code but it seems to be on the right track. yiu have various options around getting file contents such as using slurp to retrieve the contents of a file on the remote host but you would probably be better off using a lookup or filter on the control host http://docs.ansible.com/playbooks_lookups.html and http://docs.ansible.com/playbooks_filters.html. Lookups only work for files on the control hosts but it gives you options such as parsing an ini file. Ultimately you will have to piece together how to do this as it is your process but I would try to keep in mind if you can change your process to suit your tools more, I.e store the key value reg changes in ansible group vars so your changes are automatically available.
i dont really know where the head and tail is , a simple example would help me
a bit of improvement
Any replies would be appreciated
Have a look at the ‘uri’ module - you can use that to fetch the contents of a .json or .yml file and then register the results from the uri response and use the response values in your call to win_regedit.
Bear in mind the uri module will need to run on the controller, so use ‘delegate_to: localhost’ for the uri task.
Hope this helps,
Jon