# using anyconfig-0.0.5 as a module in ansible

**URL:** <https://forum.ansible.com/t/using-anyconfig-0-0-5-as-a-module-in-ansible/17036>\
**Category:** Ansible Project\
**Tags:** windows, ansible-project\
**Created:** [December 12, 2014, 12:16am UTC](https://forum.ansible.com/t/using-anyconfig-0-0-5-as-a-module-in-ansible/17036 "2014-12-12T00:16:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [December 12, 2014, 12:16am UTC](https://forum.ansible.com/t/using-anyconfig-0-0-5-as-a-module-in-ansible/17036/1 "2014-12-12T00:16:18Z")

</div>

" 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.

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [December 13, 2014, 5:47pm UTC](https://forum.ansible.com/t/using-anyconfig-0-0-5-as-a-module-in-ansible/17036/2 "2014-12-13T17:47:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [December 13, 2014, 5:51pm UTC](https://forum.ansible.com/t/using-anyconfig-0-0-5-as-a-module-in-ansible/17036/3 "2014-12-13T17:51:01Z")

</div>

PRs, if you are interested are:  
[https://github.com/ansible/ansible-modules-core/pull/384](https://github.com/ansible/ansible-modules-core/pull/384)  
and

[https://github.com/ansible/ansible/pull/9611](https://github.com/ansible/ansible/pull/9611)

Jon

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [December 15, 2014, 11:56am UTC](https://forum.ansible.com/t/using-anyconfig-0-0-5-as-a-module-in-ansible/17036/4 "2014-12-15T11:56:16Z")

</div>

A second copy of lineinfile is something I do want to avoid 🙂

The others are good things. We may still look at how to make these share more in common using the ‘v2/’ codetree when that gets closer to completeness.

Thanks!
