19:11:47 #startmeeting ansible core irc meeting 19:11:47 Meeting started Tue Jan 22 19:11:47 2019 UTC. 19:11:47 This meeting is logged and archived in a public location. 19:11:47 The chair is bcoca. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:11:47 Useful Commands: #action #agreed #halp #info #idea #link #topic. 19:11:47 The meeting name has been set to 'ansible_core_irc_meeting' 19:12:03 * alongchamps is present 19:12:12 #topic https://github.com/ansible/ansible/pull/50705 19:12:14 o/ 19:12:25 federico? 19:12:27 I'm trying to get here, immersed in reading some cpython code to figure something out 19:13:01 im late cause heater was 'giving up' so i had to shut it down 19:13:07 I think that 50705 is for the network meeting 19:13:24 and he never appears in this meeting ... 19:13:38 Yup. 19:14:56 #topic https://github.com/ansible/ansible/pull/51030 19:15:41 i think this brings 'correct behaviour' but the wrong one has been out for soo long i hesistate to push it through 19:16:37 I am interested in it 19:16:49 but yes, I agree, that changing it could cause backwards incompat issues 19:17:06 oh, it will, the question is mostly, what is more painful? 19:17:18 continue with bad sytnax, or force change of those using it? 19:17:21 I added 2 related issues to show what current problems are 19:17:28 i saw 19:17:34 * sdoran reading through them 19:18:06 I think that the current behavior, although sucky, is at least understandable, but it certainly isn't expected 19:18:24 and we have had a number of issues opened about it 19:19:30 but due to how long it's been like this, and although I'd love to see the change, I am positive it would break existing playbooks to change it 19:20:21 and seeing as how fundamental when is, it could cause a lot of problems for people 19:20:26 me too, i just dont know how many .. if <1% .. im fine, if >25% ...er wont make the change 19:20:52 removing users, deleting dirs, hosing lots of systems. 19:20:53 hence why i brougt it up here 19:21:00 I think it would be hard to guage the percentage 19:21:31 madcap scheme: you push a rule into ansible-lint which complains about bar vars and see how many tickets get raised ;) 19:21:38 from our tests, i only had to fix 1 instance 19:21:45 but no clue how representative that is 19:22:09 actually, i was thinking 'push to devel' and revert if pitchforks and torches abound 19:22:25 bcoca: I'd probably say not very. I'd guess the people with more issues with it aren't as knowledgable as us, and we aren't likely to hit those issues 19:23:06 like those using the string "false" as values for vars 19:23:16 meant to be the boolean false 19:23:20 yep 19:23:36 suddenly, that becomes truthy with the change 19:24:14 well, only if double interpreted, yaml will already make it false otherwise 19:24:17 I personally want it, but am uncomfortable with the potential of problems 19:24:38 well, as i see it, we bite the bullet now or later 19:24:48 or never :) 19:24:51 or we choose to ignore the bugs this creates? 19:25:08 I think we need more input regardless 19:25:22 not sure how to get it aside from merging and letting users of 'devel' scream 19:25:27 does this change affect usage such as `when: enable_my_feature` -- 'enable_my_feature' being a boolean variable ? 19:25:42 cyberpear: possibly 19:25:55 specialy when its not really boolean 19:25:58 if `enable_my_feature` is actually the string "false" then yes 19:26:16 as opposed to boolean False 19:26:19 I see 19:26:31 but unless its a 'double evaluated var' it should be boolean 19:26:41 i.e myvar: 'false' <= will create a boolean 19:27:09 or `-e my_var=false` 19:27:10 myvar: '{{ condition|ternary('true', 'false') }}' <= that might get you a string 'false' 19:27:36 I think I understand this. I'm in favor of fixing this. Is it possible to warn so we can have a deprecation period? 19:27:42 yeah, yaml definitions are safe, but ini are not, also double templating 19:27:47 how about usage such as `when: not enable_my_feature` ? 19:29:28 This would definitely break some things. But the current behavior is quirky and confusing and should be fixed. 19:29:29 if enable_my_feature is a string 'false' that would be False. If it's the bool False that would be True. 19:29:36 if C.CONDITINAL_BARE_VARS: ? 19:30:06 and deprecation warning? 19:30:21 we could add a deprecation warning, just based on if we make it into that if statement 19:30:28 I'm not sure if we need a toggle though 19:30:31 +1 to a deprecation warning 19:30:37 just deprecation warning, and then switch over at the end 19:30:43 Agree with @sivel. Warn but no setting. 19:30:48 https://gist.github.com/bcoca/bcb344cd6bdb8e93c82c75b46079714a 19:30:51 It's just gonna get fixed, so update your playbooks. 19:31:21 well, toggle is nice so after we switch people can still go back 19:31:33 and those that want 'new behaviour' can turn it on righ away 19:32:30 I think the problem with that is supporting that behavior into the future. 19:32:37 would that mean the toggle would be deprecated? Otherwise no need for the warning, right? 19:32:43 toggle would be temporary 19:32:53 Ah. 19:33:07 no, toggle is there to switch behaviour on/off, deprecation is about the behaviour itself (toggle can be deprecated/removed later after default switch) 19:33:58 k, so if i add toggle (default current) and deprecation all ok on merge? 19:34:11 Well, we'd just have to make sure the setting doesn't covey a sense of longevity, i.e., we're not just changing the default when this is deprecated, but we're removing the ability to use this behavior. 19:34:28 Sounds good. 19:34:32 well, first we change default, then we remove both behaviour AND toggle 19:34:38 toggle description will say as much 19:34:48 👍 19:35:07 #topic https://github.com/ansible/ansible/issues/35382 19:35:58 seems like at one point we added 'blanket' state: absent if 'options included path' 19:36:07 which assumes path is only for 'remote filesystem path' 19:38:04 imho modules should return this themselves, this is not a 'global' we should take care of 19:39:25 Seems the intent was to always return a `state` key. 19:39:53 Rather than depending on the module to do it, maybe? 19:39:55 yes, that is the intent, i just don't think that is valid across all modules and that the 'file specific' modules should handle this themselves 19:40:18 it might had made mroe sense 5yrs ago when 90% of our modules were 'file related' 19:40:43 I agree. This should be handled by the modules. 19:40:58 * sdoran tries to imagine the ripple effects 19:41:14 we just have to ensure the modules return 'state: absent' when path is missing 19:41:25 mostly anything under files/ 19:41:33 but probably a few others 19:42:12 Ok. I can work on a PR to fix this. 19:43:23 sdoran++ 19:43:37 #topic https://github.com/ansible/ansible/issues/35382 19:43:53 there was complaint about the name, but its same name of the existing feature 19:44:24 bcoca: that is the same topic, did you mean to grab a diff URL? 19:44:26 I think we want https://github.com/ansible/ansible/pull/49219 19:44:45 #topic https://github.com/ansible/ansible/pull/49219 19:44:47 yep 19:45:00 We are mind readers. :) 19:45:37 should we have a toggle, or would it make more sense for all input to be marked unsafe? 19:46:17 idk, i thought about it but then there are people that might input a template 19:46:25 i wouldnt' but ... they are crazy out there ... 19:46:42 If all values were unsafe, would that prevent variables for vars_prompt fields? 19:47:02 would prevent you from using templates as input 19:47:08 it would just mean that values provided are not templatable 19:48:48 I want to say that would be ok. I was thinking of templated the `vars_prompt` values, which is different. 19:49:08 But, yeah, I imagine there are people who enter Jinja strings in the prompt. 19:49:40 that seems...odd 19:49:44 who would do that 19:49:47 I usually don't type template values into a prompt, so setting `unsafe: true` by default makes sense to me 19:50:02 https://github.com/ansible/ansible/issues/32723 19:50:02 * cyberpear does pass templated strings as `-e myvar={{ someothervar }}` 19:50:09 its a change from current behaviour so i prefer to leave false as default for now 19:50:10 hax 19:50:28 btw, tower disallows jinja in extra/survey vars now 19:50:30 by default 19:51:00 vars_prompt was never meant for tower 19:51:07 would this affect pause-prompt usage? (vs vars_prompt) 19:51:15 no, pause is not affected 19:51:24 was thinking of adding toggle there also 19:52:53 I'm find either way with the unsafe change. Just asking questions 19:53:30 I think we are about at time for today 19:53:46 always ask, its better to repeat a question than to miss one that no one considered 19:53:57 k, quick vote on merging unsafe? 19:54:49 * cyberpear would vote +1 19:55:26 can i assume no one else cares either way? 19:55:33 +1 if you add tests :D 19:56:01 we already test unsafe 19:56:06 didnt want to deal with expect 19:56:32 We have vars_prompt tests. Should be able to just add one pretty easily. 19:56:53 k, will do 19:57:02 Hopefully I already did enough messing with pexpect to make it easy to add a new test. 19:57:44 eek, hardcoded cits in side intermediate test script ... 19:58:01 k, that is all the time for today, one more item will have to wait till next 19:58:03 #endmeeting