Re: [ansible-project] using anyconfig-0.0.5 as a module in ansible

2014-12-13 Thread J Hawkesworth
Sounds to me like maybe you are after win_copy, win_template and win_lineinfile 
modules. I have created PRs for the first two. 

If you don't mind working from development version of Ansible you could try 
them now. I'd be grateful for any feedback. 

That might get you most of what you need, with the exception of replacing lines 
in existing files. You might find using the existing lineinfile module as a 
starting point would be a help. Actually,  thinking about it, you might be able 
to make use of a combination of of fetch, lineinfile and win_copy to manipulate 
the configuration files, if you can run lineinfile delegated to your Ansible 
controller, and you can get away with replacing the files on your windows 
nodes. 


Jon


-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/69520b9c-15b2-4fbf-b3a0-854e54fa17bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] using anyconfig-0.0.5 as a module in ansible

2014-12-11 Thread Michael DeHaan
  Are there any other requirements or protocols unique to windows
modules? 

Generally if submitting them to core (I don't understand anyconfig yet so
not sure we'd take it), docs go in a corresponding .py file (see other
windows modules for an example.

But that's pretty much it - just follow the examples of the others, etc.



On Thu, Dec 11, 2014 at 5:16 PM, skinnedknuckles 
andersonjonatha...@gmail.com wrote:

 Along with updating software remotely I need to update multiple parameter
 files where sometimes values are to be overwritten and other times original
 values should be persisted (maintained) if they already exist. I found a
 python library called anyconfig https://pypi.python.org/pypi/anyconfigwhich
 seems to have this capability using the MS_REPLACE and MS_NO_REPLACE
 flags.  So as I understand, in order to use this code as an ansible module
 I need to modify it to conform to ansible module standards as defined in
 the documentation
 http://docs.ansible.com/developing_modules.html#common-module-boilerplate.
 And since my remote nodes are windows machines it will be set up to run on
 windows and the module name should be prefixed with win_ like all the
 other windows modules.  Are there any other requirements or protocols
 unique to windows modules?  This is a bit over my head so before I dive in
 and wrestle with it for days I just want to be sure I'm on the right track.
 OR maybe there is an easier way to do this. And I'd like to know that I'm
 attempting something that is at least in the realm of possibility.  Any
 comments or suggestions are welcome.

 --
 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-project+unsubscr...@googlegroups.com.
 To post to this group, send email to ansible-project@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/ansible-project/ee88172a-b916-4092-ae7b-a165238f0045%40googlegroups.com
 https://groups.google.com/d/msgid/ansible-project/ee88172a-b916-4092-ae7b-a165238f0045%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzhTKM5HMXdJ2-gGN8JLqa6quNBvkBHvtNOQB-sfLN5gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.