--
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-proje...@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/CAEVJ8QMv8D12U0eyVqoqDwkXDqjUKtdOe5Skz%3DPzZOqcdanydA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
!DSPAM:5310f819215451461565874!
--
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-proje...@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/668e98c0-9503-4751-b612-51018f4b75e5%40googlegroups.com.
On Tue, 4 Mar 2014, Michael DeHaan wrote:I approached this discussion with a patch to revert to the previous behaviour.
This is not the question that the poster asked Dag (plays vs tasks) -
and I'm disappointed in the way you are approaching this discussion
from a position that assumes a shadow conspiracy.
Discuss a technical solution if you like but there is no need for the hyperbole.
The discussion is NOT plays vs tasks, again you have not understood what I said in the issue ticket (or what bcoca said). ANd there is no shadow conspiracy, it is mostly history repeating. You have a conviction and it does not matter what people say. Every other view is a rare use-case.
Michael, you own this project and you give the direction. It doesn't matter what I say or what I think.
And if you wonder why I am frustrated, THAT is exactly it. You make changes without even discussing it on this list, and this is not the first time it happened and it won't be the last.
My patch for this regression was accepted, than reverted because nobody knows what is a bug and what is design.
Your reason for this change is that it was never documented, and therefore there is no specification to what is the correct behaviour. My position is that how it worked for everyone the past 2 years is how people expect it to behave. So the easiest solution is to document the existing behaviour, instead of changing the behaviour.
So I come back to my remark, if the majority doesn't care and this is not a democracy, the new way is works-as-designed. Have it your way !
So yes, I don't understand why you would want to undo the speed improvements of 1.5.0 with a (default) mandatory facts gathering at each play. Presumably because a task can change the facts. Well, if that's your concern, you should force a facts gathering per task (because every task can change facts and that has also not been documented). Or instead, leave it up to the user to decide when to gather facts, but do it at least once. (The way it always worked since Daniel Hokka Zakrisson (dhozac) implemented it)
With the current change there is no guarantee that all systems have facts gathered, so if you start ansible 1.5 with a:
----
- hosts: webservers
tasks:
- action: ping
- hosts: all
gather_facts: no
tasks:
- action: ping
----
You won't have facts except for the webservers. Whereas in the past (pre 1.5) you could simply do:
----
- hosts: webservers
tasks:
- action: ping
- hosts: all
tasks:
- action: ping
---
And all systems would eventually have facts gathered one time. So total control of facts gathering in 1.5 makes the default case worse, either because you have facts gathered at every play (overhead), or because you have to be careful in order to have facts gathered for all your hosts if you would like to avoid the overhead.
If you keep up with the existing implementation in v1.5, I am going to recommend people to always start with:
----
- hosts: all
gather_facts: no
tasks:
- action: setup
- hosts: webservers
gather_facts: no
tasks:
- action: ping
----
Simply to ensure you have facts for each host, and then disable facts gathering on every subsequent play to avoid the additional overhead of running the setup module.
I know I am not going to change your mind, but I care too much to not even try to make the case (that you seem to ignoring).
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, con...@dagit.net, http://dagit.net/
[Any errors in spelling, tact or fact are transmission errors]
--
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+unsubscribe@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/alpine.LRH.2.02.1403041339050.6649%40pikachu.3ti.be.
To post to this group, send email to ansible-project@googlegroups.com.
This means that any host that has registered something will be skipped in later plays, and can't have facts that are dynamic.
--
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-proje...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CADn%2BHsy17_huMRciD5hOfzPUqn%2BMQFNFaSfGCLcEzDRDq6tJ%2Bg%40mail.gmail.com.
To post to this group, send email to ansible...@googlegroups.com.
not what I meant, I meant that the gather_facts:false doesn't work for this case as when those plays get executed individually, they won't have facts. If left to true, then when executing in same run they will all trigger a fact gathering even if not needed.> Facts within the same Ansible run (different plays) are not cleared.
--
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-proje...@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/CADn%2BHswLPYjsG-HCtcRdChPwZMyu-fXY_Lv9RKfgnDt3BgvnHg%40mail.gmail.com.
--
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-proje...@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/CADn%2BHsxa9%3Dq1_dPZN_mr39T0VagY8QGt-oFJQuZDqMsXOwO9vA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEVJ8QOuTOoM8jzRXq_gLL7TS%2BJ%2BFiWbhnaOO-vhVbQKwcmkbg%40mail.gmail.com.
I'm saying this works for top level playbooks, and that facts are not erased between includes:# site.yml- hosts: allgather_facts: yestasks: []- include: webserver_plays.yml- include: dbserver_plays.yml
On Tue, 4 Mar 2014, Michael DeHaan wrote:
On Tue, Mar 4, 2014 at 8:03 AM, Dag Wieers <d...@wieers.com> wrote:
On Tue, 4 Mar 2014, Michael DeHaan wrote:
What you call "dynamic facts" is simply rerunning setup at the start of every play. But they are not dynamic because the next task won't have them either.I'll recap for the purposes of the list:
The question is removal of an undocumented and unclear flag, that modelled
what was a "Tri-state" boolean.
In this case, if gather_facts was not explicitly set True, it was assumed
"None", which meant "gather facts for hosts you have not talked to yet".
This means that any host that has registered something will be skipped in
later plays, and can't have facts that are dynamic.
In most if not all cases facts are static, and in case you want to re-enforce facts gathering, you could simply enable that for a specific play. Or even better, run the setup module within a play. There is no need for re-running the setup module at the start of every play. The overhead is big and the opportunities are scarce, especially if you properly structure your playbooks with self-contained plays.It was not unintuitive, everyone understood this well, nobody complained about it and could have been documented (like many other things that are not documented yet).
This was an untuitive behavior, was never documented, and was removed.
I asked it on IRC, send in a fix and it was accepted and reverted.
And if you wonder why I am frustrated, THAT is exactly it. You make
changes without even discussing it on this list, and this is not the first
time it happened and it won't be the last.
Yes, this is true.
Ansible is our project, and we're not going to spin a wheel every time we
want to change something and say "please may I". However, we are going to
use our combined experience of talking to thousands upon thousands of
users, and do that to best help everyone here.
When that is done, if we occasionally screw up -- and we will -- it's best
to ask how we can fix it, and that will result in a technical discussion.
BTW That technical discussion was not held, the decision was made when you committed it for v1.5 and released it as part of v1.5. Reverting now is harder because suddenly this is the default in v1.5.
What's even more, it was not even announced as a change in the ChangeLog.
Well, my solution would have looked very differently. To me it is a design fault if variables you register end up in the SETUP_CACHE (!). That's
So I come back to my remark, if the majority doesn't care and this is not
a democracy, the new way is works-as-designed. Have it your way !
So yes, I don't understand why you would want to undo the speed
improvements of 1.5.0 with a (default) mandatory facts gathering at each
play. Presumably because a task can change the facts. Well, if that's your
concern, you should force a facts gathering per task (because every task
can change facts and that has also not been documented). Or instead, leave
it up to the user to decide when to gather facts, but do it at least once.
(The way it always worked since Daniel Hokka Zakrisson (dhozac) implemented
it)
The gather_facts on each play is still not mandatory, as you can have a
explicit
gather_facts: "no" on each play.
What I didn't like was how gather_facts <previous implementation> broke the
ability to gather new facts, which is a serious concern, and how it relied
on SETUP_CACHE to make that decision, which is also sketchy.
very alarming to me (not knowing that part of the code).
But a simple boolean to keep track whether setup was run could have been sufficient.
BTW In the discussion of pull request you never mentioned what exact problem was fixed by removing the old behaviour. It could help if commits would give a proper description to why it was needed, and what it changes. SOmething you expect from external pull requests anyway.
Like you didn't do about me, right ? :)
Simply to ensure you have facts for each host, and then disable facts
gathering on every subsequent play to avoid the additional overhead of
running the setup module.
I know I am not going to change your mind, but I care too much to not even
try to make the case (that you seem to ignoring).
See, this is what I hate here -- you're jumping to assumptions about me
already.
How is that any different as it was. You complained about gather_facts having three states before and it not being a boolean. And now you propose to make it a three-state entity again ?
I'm not against providing a *better* way to solve this problem, that's more
clear and explicit, but the existing hack (being default behavior) was
breaking things and was not a good way to go.
What about simply looking at this as "gather_facts: auto" being a new mode,
and also being able to set that default in ansible.cfg?
Sure, BEFORE you release something as ansible v1.5.
That's the kind of technical discussion I like to have.
You are ignoring the fact that you committed it and released it in a new release, only then when people complain to give the notion you prefer to have a proper technical discussion about it.
Sure gather_facts: auto is fine by me. But it would have been a lot better if that was what shipped with Ansible v1.5 in the first place. Now it simply looks as nobody has real control over what's going on unless you give your final say. And then we have the technical discussion...
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, con...@dagit.net, http://dagit.net/
[Any errors in spelling, tact or fact are transmission errors]
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/alpine.LRH.2.02.1403041422360.6649%40pikachu.3ti.be.
On Tue, 4 Mar 2014, Brian Coca wrote:Exactly, this is what we do often as well. I didn't this implication.
I understand that, it is not the problem.
Consider my site.yml which has 23 different plays. To run with the new
behavior I gather facts 23 times.
If I change my included plays to gather_facts: false to avoid this, I
cannot run them individually anymore if they need facts (most of them do).
But now that Michael proposes to have gather_facts: auto configurable from ansible.cfg, it would suffice for me. What he thinks is best by default is not my concern, but his customer's and support's concern.
- host_list = [h for h in host_list if h not in self.SETUP_CACHE or 'module_setup' not in self.SETUP_CACHE[h]] |
--
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-proje...@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/CADn%2BHsz8mpbE5G3KUpt-vYsYHbeKBewGznP0hkyr%3Dk68oRKZ7Q%40mail.gmail.com.
--
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+unsubscribe@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/alpine.LRH.2.02.1403041551100.6649%40pikachu.3ti.be.
To post to this group, send email to ansible-project@googlegroups.com.
always => implicit
never => explicit
smart => smart
never might tend to imply gather_facts might be ignored. Some of this could also be dealt with in comments in the ansible.cfg though
(Also, green bikesheds!)
--
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-proje...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CADn%2BHswJiSC00qi6oNsoNEF4tcfAKz8YjRfvAqnQdxJKDCG6%2BA%40mail.gmail.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I changed the settings, but kept the trinary boolean (I know it bugs you) as I think it is the simplest implementation.
--
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-proje...@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/e6739ee6-d363-4a3c-927d-9ea0ce2a9572%40googlegroups.com.