Hello,
is there a reason that a role needs to be parametrised like this:
Hello,
is there a reason that a role needs to be parametrised like this:
also sprach martin f krafft <madduck@madduck.net> [2013.06.21.1625 +0200]:
Wouldn't it be more consistent (and readable) if roles could also be
parametrised with var=val pairs? I'd be happy to submit the
corresponding PR… but I wanted to make sure that the time is not
lost because e.g. there's a good reason for the status quo that I am
not seeing.
I actually like the hash form more and it’s likely we’re going to move to standardize to allow that for includes as well and would be moving documentation to follow that.
also sprach Michael DeHaan <michael@ansibleworks.com> [2013.06.22.1927 +0200]:
I actually like the hash form more and it's likely we're going to move to
standardize to allow that for includes as well and would be moving
documentation to follow that.
Compared to
https://groups.google.com/d/msg/ansible-project/W-pi3b1a3jI/qQrQNl9uU90J,
what made you change your mind?
Why not support both? I prefer not to have to use delimiters like {},
which expose too much of the underlying implementation, IMHO.
My choice.
it’s a data format, it has nothing to do with implementation.
also sprach Michael DeHaan <michael@ansibleworks.com> [2013.06.22.2014 +0200]:
My choice. it's a data format, it has nothing to do with
implementation.
You are right, of course, and it's moreover true that hashes are
more consistent with the overall configuration paradigm — YAML.
Will you also deprecate the current syntax for modules (actions),
for consistency? Or will users have to remember somehow that actions
are to be handled differently than includes and roles?
Right now, an action takes parameters and can sit alongside Ansible
keywords, e.g.
Hi,
The “role:” syntax proposal could be implemented similarly as “include:” where you have separation between module and Ansible keywords. Es far as I remember it is possible to do:
There are no plans for syntax deprecation.
Also, roles don’t make sense architecturally as actions.
Sorry.
also sprach Michael DeHaan <michael@ansibleworks.com> [2013.06.23.1533 +0200]:
Also, roles don't make sense architecturally as actions.
Weren't you the one that said that roles are similar to Puppet
defines?
By saying roles aren't just actions, I mean they cannot be interlaced with
actions in the task section, and they go under the "roles" header.
That's all.