Is there a way to create a customized ansible module that "wraps" an existing one?
I often write this:
- name: foo
become: true
copy:
src: foo/bar/baz
dest: spam/ham/eggs
owner: "root"
group: "root"
mode: "0644"
So I want to eliminate the boilerplate:
- name: foo
copyroot644: # wraps `copy` module
src: foo/bar/baz
dest: spam/ham/eggs
Is there an easy way to do this, without getting knee-deep in Python? (I don't want to reinvent the wheel, just reuse the copy
module.)