I'm thinking about creating a 'db' module for Ansible with the following
synopsis:
module name: db
args:
init=template.j2
dest=dbname.ext
type={anydbm|gdbm|bdb|dbm|cdb|csv|lsearch}
key=key
value="whatever"
ensure={present|absent}
type: most of these should be self-explanatory. Lsearch is typical for
Exim, for example, and is "key: value".
Thoughts?
Questions:
1. Michael added daisychaining *out* of a module into, say, 'file'
module (see get_url and/or assemble). Is there a way to daisychain
*from* a module? I'd very much like to be able to INITIALIZE a
database from a template on the ansible manager. (This can of course
be completed in two steps: 1. copy template and 2. run db module) but
doing it all in a single step seems cleaner.
Not vital, but nice to have: maybe Michael can think about this ...
2. Suggestions Python modules for DB-handling? There's anydbm, gdbm,
etc. I'd like to be able to support as many types as possible without
requiring installation on the nodes ... Any feedback welcome.
Regards,
-JP