15:02:51 #startmeeting core community meeting 15:02:51 Meeting started Thu Aug 17 15:02:51 2017 UTC. The chair is bcoca. Information about MeetBot at http://wiki.debian.org/MeetBot. 15:02:51 Useful Commands: #action #agreed #halp #info #idea #link #topic. 15:02:51 The meeting name has been set to 'core_community_meeting' 15:04:20 #topic changing names for set_facts and include_vars 15:04:32 #url https://github.com/ansible/community/issues/220#issuecomment-322432419 15:04:41 kustodian ? 15:05:55 that feels "proposal" like to me 15:06:23 its a rename .. not sure i agree on it requriing proposal 15:06:37 rename without alias? 15:06:40 and not a 'general rename' like plural/singular 15:06:48 jtanner: we dont allow those afaik 15:07:12 * mikedlr waves hello. 15:07:13 there should be deprecation periods like with previous renames, we've used this process several times before 15:07:39 Hi 15:07:42 * bcoca waves 15:08:16 is changing set_facts to set_host_vars actually any clearer? I may be wrong but I tend to think of host_vars as being 'host_constants'. 15:08:30 well, one counterpoint to the rename might be that later down the road if we decide that not all vars have to be squished in to hosts, "set_host_vars" may not be totally accurate 15:08:56 bcoca: chair me please 15:09:08 #chair jtanner shertel 15:09:08 Current chairs: bcoca jtanner shertel 15:09:15 #chair mikedlr andriusb 15:09:15 Current chairs: andriusb bcoca jtanner mikedlr shertel 15:09:26 #chair jhawkesworth_ 15:09:26 Current chairs: andriusb bcoca jhawkesworth_ jtanner mikedlr shertel 15:09:31 jtanner set_fact would have same issue 15:09:55 and i dont see a path on changing how vars are currently structured w/o major engine rewrite 15:10:15 yep, way down the road if ever 15:10:23 anible 5.0? 15:10:23 #chair alikins 15:10:23 Current chairs: alikins andriusb bcoca jhawkesworth_ jtanner mikedlr shertel 15:11:06 +0 from me, fine with getting a 'better name' ... really dont want to discuss what 'better name' looks like ... current and proposed all have problems and infer slightly incorrect meanings 15:11:36 if +0 is indifference, that is my vote also 15:11:40 and set_host_vars_but_unrelated_to_host_vars_dir ... is a bit long 15:11:49 i wasn't aware that the terms were confusing to people 15:12:11 hostvars vs host_vars vs facts vs ansible_facts vs set_fact vs include_vars actually setting facts ... 15:12:36 alikins: did we add cacheable to include vars? 15:13:06 tend to agree. set_host_vars etc is better and more accurate name, but hard to change names. If it works as an alias though, +1, +0 if not 15:13:39 alikins: any and all renames work as an alias, with at least a deprecation period (currntly 4 versions) 15:13:43 bcoca: re cacheable, I don't think so 15:13:57 alikins: might want to add it jsut for parity, not a priority though 15:15:09 soo .. this seems to have little support but also no opposition 15:15:35 not sure what to do now .. open to survey on 'best name'? 15:15:50 i thought that was something the proposal process was supposed to help with 15:16:26 sorta starts to become set_fact_for_playbook / include_vars_for_playbook (and/or, set_fact_for_invocation, don't remember off hand if cacheable persist across multiple playbooks.) 15:16:30 I am -1 on set_fact -> set_host_vars. although 'facts' is wrong it hints that these vars are immutable. 15:16:39 proposals normally big design elements and/or impact, i think this does not qualify, but if others insist, fine 15:17:11 i don't insist, only suggest 15:17:21 alikins: multiple plays , playbooks also, if in same run 15:17:48 jhawkesworth_: most vars ARE immutable ... just 'overridable' .. not really overwritable 15:18:30 it would be nice to have a general solution for setting a var for some specific context/scope/lifetime 15:18:48 debug 15:19:07 +0 I don't think the aliases make it particularly more clear. 15:19:36 o/ 15:19:42 ok, so im going to table this as 'not opposed, but need better names' 15:19:45 ^ agreed? 15:19:46 #chair dag 15:19:46 Current chairs: alikins andriusb bcoca dag jhawkesworth_ jtanner mikedlr shertel 15:20:00 +1 to better names. but that may be can of worms. 15:20:02 bcoca: yep 15:20:14 jhawkesworth_: its a barrel of cans of worms 15:20:15 * dag needs to look up the discussion with Michael wrt. this, because I know it was contentious back then 15:20:27 dag: i already did, set_local! 15:20:29 barrel of canned monkey worms 15:20:31 right :-) 15:20:38 I don't think it's ever been clear what scope/context/lifetime a 'fact' applies to 15:20:53 dag: look at minutes from prev meeting, i even got the ticket in which this was added 15:21:03 bcoca: cool ! 15:21:06 will do 15:21:37 alikins: which type of fact? there are 2, but in any case their scope is 'associated to host' which is 'global to run' once defined 15:22:20 the problem with vars is that we really don't 'just have scope' ... we have scopes with vars: <= 'for this object and those contained by it' 15:22:39 but things like roles and set_fact and extra vars and inventory ... dont have real scopes nor interactions 15:23:04 they have precedence and availability ... which are not really related to scope 15:23:24 i.e host related variables are always available once defined .. just via hostvars[hostname][varname] 15:23:38 vs directly available hosts: hostname .. then u can use varname 15:24:11 context is more important than scope with our vars (or semi constants ...) which is not what most programmers would expect 15:24:42 it helps if you think of plays as 'for loop on hosts that locallizes vars by dumping hostvars into locals()' 15:24:53 ^ if that makes sense 15:25:50 * bcoca suspects everyone is now in a corner sobbing ... 15:25:56 :-) 15:26:22 can make the names 'truer' to what they actually are, but may not actually benefit understanding. 15:27:27 it's a study in psychology and linguistics 15:27:39 i should make a presentation 'understanding ansible vars ... straight jackets in the back for when you are ready' 15:27:45 :-) 15:27:56 heh 15:28:55 the only reason people are still here is because they want to discuss my next topic, I am sure 15:29:02 :-P 15:29:03 dag: always 15:29:10 /endmeeting 15:29:15 haha 15:29:43 ok, updating ticket .. need to figure out naming .. letting future meetings loose time on that 15:29:52 #topic sleep action 15:29:54 +1 on naming waits to see who is still sane after bcoca's presentation 15:30:02 #url https://github.com/ansible/ansible/pull/26889 15:30:11 mikedlr: pretty much have to be insane going in 15:30:53 took me rewriting var manager to get grasp on how vars really work internally , i had more or less figured out functionally ... but did not know why 15:30:53 so we need to have a variable sleep per target 15:31:06 pause is not a solution 15:31:19 its one solution, just does not apply 'per target' 15:31:28 wait_for is the one that does 15:31:35 other solutions were proposed, but I still prefer a 'sleep' module 15:31:57 bcoca: why doesn't sleep apply per target ? 15:32:01 i find it redundant with wait_for (and others like loops/until/etc which also have pauses) 15:32:17 dag: refered to pause 15:32:29 ok 15:32:56 ^ i actually like my with_sequence as it shows a countdown ... 15:32:59 well, there is a second use-case for sleep, since pause is run only once (for the first target) there is no guarantee the playbook actually will pause 15:33:15 if that first host happens to skip that task, pause is skipped as well 15:33:24 (to me that is a huge mistake in the design) 15:33:45 at least sleep can prevent this 15:33:52 dag: agreed that pause does not solve all cases, but neither does sleep, yet we solve all cases currently with examples given in ticket, specifically wait_for: timeout=10 15:34:22 bcoca: wait_for to me is band-aid for the simple reason that the timeout is an error-condition 15:34:24 pause was meant as a sync point, does it's job 15:34:30 normally when the timeout is reached, the tasks fails 15:34:48 dag: no, timeout is only error when in conjuntion with other conditions, otherwise its a sleep (designed specificaly that way) 15:34:52 for some strange reason this is exceptional behaviour and would not come to mind 15:34:58 bcoca: right, exceptional 15:35:10 so wait_for: port=22 timeout=10 <= its error when timeout reached 15:35:17 wiat_for: timeout=10 <= not an error 15:35:30 ^ well, spelling error 15:35:37 the documentation does not even describe that behaviour 15:35:46 or that it is an exception 15:35:54 well, that is easy to fix 15:36:07 'wait_for: timeout=10 'is a bit harder to read than sleep: seconds=10 15:37:03 i dont dispute that , but i find it redundant .. would like to minimize redundancy 15:37:08 so I like sleep for the syntatic sugar. But figuring out which of sleep, pause and wait_for to use is more head scratching 15:37:17 if this can be fixed with doc line vs new module ... i go doc 15:37:30 jhawkesworth_: yes, I would prefer not having to have the distinction between sleep and pause to be honest 15:37:40 but they both work at a different level 15:37:54 I don't mind renaming sleep if there's a better name 15:38:51 i would prefer making sleep a alias for wait_for ... which is really 'sleep_until: ...' 15:40:34 wait_for docs: " You can wait for a set amount of time C(timeout), this is the default if nothing is specified" 15:40:55 should be a bit clearer and include a 'sleep example' .. but its documented 15:41:10 bcoca: but the timeout is the error condition, that's the part that is not documented 15:41:28 its not by itself 15:41:34 in all uses it causes an error, which is what I assumed 15:41:37 which is badly implied in that phrase above 15:41:41 right 15:41:45 im fixing that now 15:42:10 I don't mind if that is fixed, but I still think using wait_for is band-aid 15:42:34 if nobody is weighing in, I guess we'll have to use seniority to make a decision 15:42:37 :P 15:43:45 pause wait sleep - all similar ideas - would be nice to have 1 module that can do all with aliases. 15:43:49 *yawn* 15:44:01 but not looked at the code so maybe that's daft 15:44:14 * jhawkesworth_ gotta go. later all 15:44:37 jhawkesworth_: wait_for runs remotely per target, sleep runs locally per target, pause runs at the playbook level (once for all targets if you're lucky) 15:44:39 well, wait_for + run_once can emulate the pause behavioru on waiting .. but pause was created for prompting 15:45:08 so in fact, in my case it's not just: wait_for: timeout=10, you actually have to add: delegated_to: localhost 15:45:14 if we add 'prompt' to wait_for .. pause then becomes obsolete 15:45:30 because the target does not exist 15:45:38 or local_action ... yes 15:45:38 that's why I think sleep should exist 15:45:48 local_action should die 15:45:49 to avoid 1 keyword .... 15:46:00 if we killed `action:` we should get away with local_action IMO 15:46:08 action still lives 15:46:16 you avoid local_action, and introduce `module` 15:46:20 so you don't gain a thing 15:46:27 you lost me 15:46:43 ansible -- automate in a language that approaches plain English 15:47:01 bcoca: with local_action you have to add the module in a second key 15:47:19 local_action: 15:47:19 module: wait_for 15:47:19 timeout: 10 15:47:22 a handler attached to a sleep could be interesting , more or less a timer event (more or so if handlers are configed to run 'immediately') 15:47:24 sleep: 15:47:25 seconds: 10 15:47:25 same with action: 15:47:43 wait_for: 15:47:43 timeout: 10 15:47:43 delegate_to: localhost 15:48:03 did the indentation wrong 15:48:15 (albeit, a blocking timer event) 15:48:31 so yes, I prefer the more natural english 15:48:54 ansible -- automate in a language that approaches plain English 15:49:13 yes, when you want to sleep you have to delegate that to your localhost 15:49:18 makes no sense to me 15:49:34 I understand where that comes from, but it's band-aid 15:49:39 for me wait_for makes more sense .. since no one is naping 15:50:14 but it shouldn't matter where you're waiting 15:50:28 waiting for time to pass on a remote target is silly at best 15:50:36 if 'only' waiting, i agree, but that is easy to fix w/o new module 15:50:37 it's an unneeded round-trip 15:51:01 but either, 'sleep' is a portable thing, it's simple, and intuitively named and findable, and otherwise harmless. +1 from me. 15:51:18 -1 as redundant 15:51:46 +1 ... i find it similar to reboot 15:52:06 reboot? 15:52:18 which reminds me to finish the reboot module :-/ 15:52:30 i know of win_reboot .. but not reboot 15:52:43 yes, there are ways to accomplish it with existing language, but the behavior is not tested and all the examples out there are wrong 15:52:43 bcoca: it's a platform-agnostic reboot module 15:53:01 jtanner: there is good role for linux reboot 15:53:17 ^ you can add win_reboot to it .. cause windoez is 'special' and pretty hard to do 15:53:28 * bcoca needs to find it 15:53:42 was mostly using command: reboot + wait_for 15:53:43 sorry, it's a tangent 15:53:52 bcoca: hmm, I never made a PR for it: https://github.com/dagwieers/ansible/tree/reboot-module 15:53:55 jtanner: not sure how it is same as this case 15:53:57 only using it as an example 15:54:05 could sleep be considered a meta action for influencing strategy behavior? (not this particular implementation, but the general idea) 15:54:08 no redundant module 15:54:30 yes, it can be done in a few tasks on linux side .. but many OSs make this much harder 15:54:32 it's the same in the sense that without a clear module to do the function, people come up with 50 different suggestions on how to do it and most of them are wrong in some way 15:55:13 which is more a question of good docs than creating a module for every possible combo ... you want to maintain more modules which do almost same thing? 15:55:29 your loop control examples look odd to me for simple sleep ... i would have just done shell: sleep 10 15:55:50 wait_for shoudl be the norm, that was just to show 'counter' 15:56:04 wait_for: timeout=10 15:56:11 it's only my opinion 15:56:14 ^ would be almost same as your shell: sleep 10 15:56:15 it doesn't mean you are wrong 15:56:24 jtanner: right, but I need to delegate that to localhost as well (as the target needs to be created) 15:56:33 jtanner: that was one of many examples of ways to do same thing 15:56:41 here is the issue ticket for the reboot action plugin: https://github.com/ansible/ansible/issues/16186 15:56:43 until/retry/pause <= another 'sleep' 15:57:24 so somehow I was fearing this would be one of those topics that go on forever 15:57:33 I am sorry to have caused another one of those :-/ 15:57:53 productivity goes down the drain 15:58:17 bad dag. 15:58:38 yeah, ansible development halted for an hour because of me, again ! 15:58:58 dag: im not saying that your interface lacks merit, i just want to not maintain more code in main repo than rwe really need 15:59:13 so you guys figure it out, it's there for the taking, or leaving :) 15:59:19 if wait_for can do same .. .really hard to justify more of same code 15:59:35 bcoca: to be honest, this is easier to maintain than an exception in wait_for with an action plugin 15:59:38 as for reboot, i fail to see the similarity 15:59:43 that's more complexity IMO 15:59:59 dag: if it were either/or .. but this is AND 16:00:16 we are maintaining that code already, this will not eliminate that code 16:00:23 bcoca: read that ticket, you'll see a plethora of solutions for doing reboots but none looks really the right way 16:00:30 bcoca: a reboot should just be that 16:00:36 like a sleep should just be that 16:00:46 and not delegated_to: localhost 16:00:50 dag: i fail to see the connection 16:01:01 or using a timeout that by default is an error condition 16:01:12 dag: no, by default it is not 16:01:17 its actually the opposite 16:01:29 I spelled it out, maybe you don't want to see it ;-) 16:01:31 it was made an error condition when other conditions were applied 16:01:57 bcoca: ok, if you have 10 use-cases, and in 1 it acts differently, that to me is the exception 16:02:05 how do wait_for: or sleep: handle being ran with async: ? 16:02:13 but I don't want to discuss semantics about exceptional here 16:02:25 alikins: sleep is an action plugin 16:02:27 alikins: wait_for runs with async, sleep does not 16:02:45 if you want to sleep asynchronously, then I think you need to see a docter :-) 16:02:47 Would the idea of documenting wait_for be to document it in the pause module? 16:02:48 but async basically defeats the purpose of this feature 16:03:07 abadger1999: i can add that, already have PR documenting wait_for as a 'sleep' 16:03:14 abadger1999: still, delegating your sleep to localhost feels so wrong 16:03:19 "pause is not what you want if _____. Use the wait_for: timeout=SECONDS if you need that. 16:03:31 dag: you dont NEED to , but it is saner to do so 16:03:50 bcoca: YES, i NEED to because the target still has to be created 16:04:01 well, depends on what you are doing 16:04:13 well, there is firmly disagree with you 16:04:22 there is no real use-case for sleeping remotely 16:04:52 so no, if we are talking about sleeping, there is no "depends what you are doing" 16:05:02 no, but it also does not break in many cases, i.e restarting tomcat and waiting cause service script lies to you and you know it takes 200s to be ready 16:05:12 you shouldn't be making a connection 16:05:17 ^ my actual first usage of wait_for: timeout=250 16:06:13 it should be as simple as: sleep: seconds=10 in EVERY use-case 16:06:42 the only problem I have is the sleep vs pause discussion, which is something we cannot fix 16:07:16 and we probably ought to make a note in both module docs to explain the difference 16:07:43 already done 16:08:00 can't be done, unless you also merged my sleep PR :) 16:08:18 we disagree on that 16:08:32 you disagree with me, jctanner and alikins 16:08:40 but yes "we" disagree on that too :) 16:09:13 so let's discuss next week again 16:09:21 and continue the meeting 16:09:25 because I cannot call it a day 16:11:51 bcoca: next topic? 16:12:01 none left 16:12:35 Okay open floor then 16:12:41 #topic open floor 16:13:05 though we are over, so if noone has anything closing in 5 16:13:07 Ansiblefest SF is coming up 16:13:28 And there will be a contributor summit on 2 days this time, one the day before and one the day after (Wed and Fri) 16:13:35 Feel free to sign up to attend 16:13:39 Or join on video. 16:13:48 We're getting input on agenda items here: https://public.etherpad-mozilla.org/p/ansible-summit-september-2017 16:13:54 abadger1999: 2 days, do we plan something like a sprint ? 16:13:55 So feel free to add items or to vote. 16:14:14 dag: Not yet but feel free to put it on the list. 16:14:18 I'll be there both days. 16:14:22 Still looking for people interested in testing cloud modules. AWS team has limited resources and will be in conferences and stuff 16:14:33 I had already booked my flight, need to reschedule it if I still can 16:14:37 i think nitzmahone and several others might be leaving partway through friday. 16:15:08 i'd be happy to help but I'm not much help on either windows or cloud. 16:15:24 gregdek: You around? 16:15:36 gregdek: dag wa swondering if we're planning sprints. 16:15:42 Anyone who wants to do manual testing / learn about setting up serverless systems should drop by #ansible-aws 16:16:00 abadger1999: I'll put it on etherpad, no problem 16:16:04 dag: Cool. 16:16:08 don't need to wake up gregdek for this :p 16:16:12 That's all from me on this topic 16:16:25 let me quickly see if I have anything still in queue 16:17:17 nope, I only got module-related PRs open 16:17:36 sleep was the only think standing out because of bcoca's remarks 16:17:42 thing 16:18:01 Cool. 16:19:12 #endmeeting