Discussion:
[ansible-project] :children group syntax
Dan Mick
2015-07-08 02:53:02 UTC
Permalink
Why does :children exist? Why couldn't it be the case that groups of
groups just recurse on their components, expanding as they go?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/54f7f225-fb17-421e-b2fe-432b7cc0f386%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-08 13:07:38 UTC
Permalink
its a way to distinguish between groups and hosts, as both entries can
look the same.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8kTDudv9Yb3e6p8R1atETR2aiuAXkVgdOVefwpeD6iq%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Dan Mick
2015-07-08 17:26:28 UTC
Permalink
Well of course, but why? Why is it necessary to distinguish? "If group,
expand group; if not, don't"
Post by Brian Coca
its a way to distinguish between groups and hosts, as both entries can
look the same.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cb8a4abb-36e1-4d7e-9869-79747736dbe5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-08 17:33:00 UTC
Permalink
yes, how do you know if it is a group? it might be defined below, or
it might be a host.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mBmPepmQxAhk%3D9v9AJhcx8HAQs0rBT%3DgXk%2BkLti6j0XQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Dan Mick
2015-07-08 18:03:06 UTC
Permalink
you know if it's a group if it has a name that matches a defined group
name. Are you saying it's solely to allow forward references to groups?
If so, isn't it an attribute of the child name itself that it refers to a
group, and not "the supergroup can only contain children"?

i.e. any of these make more sense to me than the current definition:

1) expand if a name refers to a known group; otherwise don't expand
(doesn't handle forwards)
2) make two passes through inventory files to handle forwards (might be
tricky/undoable with dynamic inventory)
3) tag each groupname within the group:

[groupofgroups]
host1
group1:group

The way it is now, effectively defining every member of the group as a
group with the unintuitive "children" on the enclosing group, seems the
least intuitive of all, and unlike every other such tool.
Post by Brian Coca
yes, how do you know if it is a group? it might be defined below, or
it might be a host.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fbf67d38-9192-4813-bc44-b1617bf52ef0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
2015-07-08 18:14:42 UTC
Permalink
my initial proposal was require @ as the start of group names, many
ways to do it, this is what the original author came up with and
avoids multiple passes or non forward working groups.

Even better, you can create a inventory plugin that implements any
format you want, but for now there are no plans to change the current
format as its been the same for roughly 3yrs and most people are fine
with it.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8mfENxkG_cCTesE0WFvNT3cmO5U8xS0TW0w5K7XbELnOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Dan Mick
2015-07-08 18:41:08 UTC
Permalink
Not suggesting change, just trying to understand rationale. I guess it's
the way it is because it's the way it is.
Post by Brian Coca
ways to do it, this is what the original author came up with and
avoids multiple passes or non forward working groups.
Even better, you can create a inventory plugin that implements any
format you want, but for now there are no plans to change the current
format as its been the same for roughly 3yrs and most people are fine
with it.
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2b14a0f5-c2f9-4cb2-9bd0-15ffc697373d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...