Hi All,
I’ve noticed that ansible is slightly harder to use than it can be: every command has its own idea of what the name of the main parameter is. i.e. “pkg”, “src”, “uri”.
May I suggest this gets all changed to item? One less thing to look up and remember.
All the best,
Berend.
This is already pretty much done, everything responds to “name”, except for things that obviously have a src and destination, like the copy and template modules, where I think src/dest are still appropriate, or when the name isn’t really a name.
Now what we should do is make sure the documentation consistently uses “name”.
I think “item” would be confusing given it’s use in “with_items” and so forth.
–Michael
also sprach Michael DeHaan <michael.dehaan@gmail.com> [2013.06.22.1901 +0200]:
This is already pretty much done, everything responds to "name",
except for things that obviously have a src and destination, like
the copy and template modules, where I think src/dest are still
appropriate, or when the name isn't really a name.
apt still takes 'pkg', lvg wants 'vg', lvol wants 'lv', apt_key has
'id', apt_repository has 'repo', …
What is the process of changing all those? How does Ansible
deprecate stuff in user configs?
in the modules, aliases can be used to rename to ‘name’ while keeping the old pkg, etc.
Great! Switching my stuff now.
One more: what about the true/false or on/off? I think we could just settle for one thing here as well. Just use true/false.
Modules “booleanify” things for the most part, so yes/no gets converted internally to true and false, so generally we’ve just been using yes/no everywhere. There is one or two examples (I believe zfs) where the module needs to be updated to enable that.
That’s exactly the example I had in mind
Was writing zfs tasks and noticed it used on/off.
Thanks a lot,
Berend.