Tidy module

Hi guys,

I’ve created a “tidy” module for Ansible (module useful to remove unwanted files based on specific criteria) and I would like to have an opinion about that.
Any comment or suggestion is really appreciated!

You can check it here: https://github.com/rmarchei/ansible-tidy

Thank you!

Looks very interesting!

How about submitting it as a pull request?

We’d love to have it.

Hi, I’m just getting starting writing custom modules from ansibles and yours looks like
a great example to learn from. One thing I noticed when I cloned your repository and
installed tidy into /usr/share/ansible/system is that the documentation string seems to
have some problems in the parsing

when I run ansible-doc tidy I keep getting errors from several of the description strings
that had line break in them. I changed those to have no line breaks and eliminated those
errors but even after that I still get the traceback:

Traceback (most recent call last):
File “/usr/bin/ansible-doc”, line 286, in
main()
File “/usr/bin/ansible-doc”, line 278, in main
text += get_man_text(doc)
File “/usr/bin/ansible-doc”, line 111, in get_man_text
desc = “”.join(opt[‘description’])
TypeError: sequence item 0: expected string, dict found

when I run ansible-doc tidy

I ran the documentation (with the fixed description strings) through a YAML validator and it
said it was now valid YAML so I’m sure what what’s at this point.

Anyway, the module itself appears to work just as advertised so thanks for sharing your
code and hopefully the documentation string issue isn’t too difficult to resolve

Cheers!
Mark

Thank you Michael and Mark,

the documentation string should be fixed, if you want you can check it now.

I’ll wait a little more and if there aren’t other comments I’ll send a pull request.

Thanks again!

Pull request submitted: https://github.com/ansible/ansible/pull/7753

New comments look great in ansible-doc command - glad I could contribute a little!

Mark