19:00:32 #startmeeting Ansible Core IRC meeting 19:00:32 Meeting started Tue Feb 12 19:00:32 2019 UTC. 19:00:32 This meeting is logged and archived in a public location. 19:00:32 The chair is sdoran. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:00:32 Useful Commands: #action #agreed #halp #info #idea #link #topic. 19:00:32 The meeting name has been set to 'ansible_core_irc_meeting' 19:00:38 o/ 19:00:49 #info Agenda https://github.com/ansible/community/labels/core 19:00:52 #chair nitzmahone 19:00:52 Current chairs: nitzmahone sdoran 19:00:53 * shertel waves 19:01:04 #chair shertel 19:01:04 Current chairs: nitzmahone sdoran shertel 19:02:05 #topic followup discussion about possibly doing SSH-like-only connection method first, in order to flush out the `ansible_python_interpreter` task_vars issue 19:02:14 .hello2 19:02:15 maxamillion: maxamillion 'Adam Miller' 19:02:22 #chair maxamillion 19:02:22 Current chairs: maxamillion nitzmahone sdoran shertel 19:02:27 hum, don't see dw here yet 19:02:38 #chair gundalow 19:02:38 Current chairs: gundalow maxamillion nitzmahone sdoran shertel 19:02:39 yeah, might want to open floor or anything else first 19:03:02 Ok, moving to next topic until dw is around. 19:03:10 #topic https://github.com/ansible/ansible/pull/51768 19:03:20 +1 19:03:21 This is from dag 19:03:22 * agaffney is here 19:03:33 #chair agaffney 19:03:33 Current chairs: agaffney gundalow maxamillion nitzmahone sdoran shertel 19:03:37 when dag and I agree, you know it's something good ;) 19:03:47 oooo boy 19:04:02 SHIPIT 19:04:18 Yeah, I can't come up with a situation where this could break anything- if nobody else can either, it's an excellent change 19:05:01 agaffney: thanks for adding the Porting Guide 19:05:09 * sdoran reading through it 19:06:44 This is very nice. Even has tests. 19:07:01 I wanted to make damn sure that it wouldn't break anything 19:07:39 Someone will always find a way to break it. :) 19:07:54 Yeah- it's a big change to the signal path, but until someone comes up with a concrete fail... 19:07:54 Nice, simple way of fixing it :-) +1 from me, though I feel like the last time this was discussed people weren't agreeing on the desired behavior (i.e. expecting some things should fail) and this would break their expectations. 19:08:38 shertel: got any specifics? I couldn't come up with anything realistic 19:09:27 dag mentioned ignore_errors 19:09:32 *worst* case, maybe we add a config switch to disable the behavior, but until someone comes up with something remotely plausible... 19:09:40 +1 19:09:52 I don't think this would even interact with `ignore_errors` off the top of my head 19:10:10 +1 19:10:17 (would be a task templating failure) 19:11:17 I'll merge this after tests pass. 19:11:21 cool! 19:11:23 Hm... okay. I haven't played with it. Does it affect expecting things to be undefined? 19:11:53 I just rekicked the previously failed tests. they don't appear to be related 19:11:55 shertel: if you're not familiar with null-conditional operators, this basically turns "." into one 19:11:58 #action Merge PR #51768 once tests pass 19:12:05 thanks sdoran 19:12:39 so the end result will still be Undefined, but it lets you dot through multiple layers of undefined to do things like `default` without intermediate layers 19:12:46 shertel: it shouldn't. if 'foo' is undefined, 'foo.bar.baz' will also be undefined 19:12:47 I'm not explaining it very well 19:13:29 it just prevents the first part from bombing with a null reference instead of returning undefined 19:13:32 all this really does it remove the extra hoops you have to jump through to handle multiple levels of undefined values 19:14:47 Ok, moving on to our next topic. 19:14:57 #topic https://github.com/ansible/ansible/pull/46687 19:15:59 this makes me nervous with collections changes 19:17:16 if it's purely informational and would always have the fully-qualified role name, it'd probably be fine, but we might want to hold off merging it until collections/role stuff is merged to devel, then revisit any potential weirdness 19:17:27 I feel like `v.setdefault('ansible_parent_role_names', []).insert(0, self._parent_role.get_name())` is backwards from what I would expect 19:17:36 (otherwise we're potentially adding complexity/delays/brokenness) 19:17:42 #chair sivel 19:17:42 Current chairs: agaffney gundalow maxamillion nitzmahone sdoran shertel sivel 19:17:59 sivel: how so? 19:18:24 I might just be not looking closely enough 19:18:39 nitzmahone: I like the idea, but I do worry about what it could mean for content ... I'd be interested in input from the galaxy/mazer folks 19:18:42 My initial thought was that the most direct parent would be at the end, instead of the front 19:18:45 sivel: you mean that the most recent parent is at the top? 19:19:03 sivel: Agreed. I felt that was upside down. 19:19:20 maxamillion: yeah, I'm not opposed to the idea either (we don't do a great job of surfacing meta-exec data like this today) 19:19:31 oh, that's how I expected it to be ordered ... not like a stack, but like a list ... most direct parent first 19:19:37 but looking closer, I may just be wrong, as that code looks like it inserts in reverse order 19:20:00 *shrug* I'd have to see the output 19:20:15 at a glance it looks like what I'd expect (most current parent at the head of the list) 19:20:24 +1 19:20:26 The docs state the most recent role is the first item in the list. The code matches that. 19:20:33 Still seems upside down to my mind. 19:20:55 * nitzmahone shudders to think what kinds of things people would use this for 19:21:14 and if we have `names` and the parent is in [0], then why do we really need `name`? 19:21:56 Nitpicking aside, what are the implications of adding this? 19:22:16 Seems like a very odd thing to need. 19:22:27 Potentially useful forensic data, potential gun-pointed-at-foot for more dynamic role behavior... ;) 19:22:33 Though I generally frown upon including roles from roles to avoid creating block holes. :) 19:22:42 *black 19:23:26 sivel: I imagine `name` is just a convenience variable so folks don't have to use array addresses or the `| first` filter. 19:23:28 it happens more often in the wild than I ever thought it would even if it's not super common 19:23:31 So more UI than anything. 19:23:53 I've got several roles that act like tasks, and do in fact include_role (partly because I haven't yet learned to make an ansible modlue from scratch) 19:25:47 (and I've got a family of openstack roles that call each other, such as the project-creation role calling the network-creation role) 19:27:05 does this PR work for roles that use `meta: dependencies` to include other roles? 19:30:22 I am not sure. 19:30:35 * cyberpear should go test... 19:31:05 Any change to role import/include involves a myriad of use cases. It is very hard to figure out all the different scenarios you can run into. 19:31:08 would be good to have a list of parent_role_paths, to be consistent w/ names 19:31:38 (comment to that effect added to PR) 19:33:11 nitzmahone: Should we hold off on this until we can determine how this works with collections? 19:33:59 Looking at the impl, I don't *think* it should complicate things further, just a little extra test coverage to be sure 19:34:31 but there are some UI things to think about (eg, just have lists, no scalar versions) 19:34:42 Is collections this: https://github.com/ansible-collections ? 19:34:55 We should determine if this is something we want before asking the author to rebase again. 19:35:29 cyberpear: No, not at all. 19:35:32 * nitzmahone is +0.5 - as with many things, it can be useful, but could also probably be abused 19:36:06 * cyberpear could benefit from this feature 19:36:32 nitzmahone: I think I'm on board with list-only and no scalars 19:36:59 I currently use the inheritance feature that roles included with meta:dependencies will look at their "parent" roles' files/ and templates/ dirs 19:37:24 cyberpear: I'm actually not sure what that org is or those repos are, but a collection is as mazer/galaxy define it here: https://github.com/ansible/mazer 19:37:44 (haven't checked if that works w/include_role) 19:37:54 maxamillion: thanks for the reference 19:38:14 cyberpear: short version, it's a set of any one or many of Ansible roles, modules, module_utils, or plugins 19:38:23 cyberpear: with some metadata sprinkled on top 19:38:24 cyberpear: Here is an example from the mazer tests: https://github.com/ansible/mazer/blob/8bde6df0d79c6f4a5d7e70542c0e8f4ce8e2dd3e/tests/ansible_galaxy/example_artifact_manifest1.yml 19:39:38 presumable you'd be able to use those w/o having to include them in a 'roles' section? 19:40:45 they work like any other roles, more about the ability to version/distribute in groups, and trying to make plugin content a first-class citizen in galaxy (roles suck for distributing plugins for a number of reasons) 19:41:16 (right now, I have some utility roles that I hack into place by using symlinks so they can be used from command line, not just in playbooks) 19:41:28 thanks for the explanations, sorry for the derailment... 19:41:32 It seems like we don't have a strong consensus adding this change. 19:41:41 So you'd have the concept of "installed roles" with your controller, but you can also install collection content playbook-adjacent similar to how it works today 19:42:22 sdoran: yeah, if it goes list-only, and we can wait to merge it til after collections are in devel, I'm ok with it 19:43:00 (sounds sort of like 'yum install rhel-system-roles' then using those, but generic) 19:43:23 #info Revisit PR #46687 once collections are merged into `devel`, and possibly change it to be list-only. 19:43:49 #topic https://github.com/ansible/ansible/pull/51499 19:44:23 I'm in the "command-warnings are lame and we should just kill them" camp, but ... 19:46:49 I made this PR in response to an issue. 19:47:15 Someone was using `shell` to reboot a system and having an issue. 19:47:26 So I figured it may be helpful to suggest using a module. 19:47:48 Though I ended up having to do gymnastics in the action plugin. 19:47:51 The cure is worse than the disease IMO 19:48:01 I'm generally okay w/ command warnings, but I most often run into it when checking package installation using 'rpm -q mypackage' rather than the package/yum module because the former is much faster. 19:48:07 It ended up being pretty complex to make it work. 19:48:34 for 'reboot' in particular, I'm in favor of the change because the old way of doing it had 1000 forms, most of which were broken in some way. 19:49:59 (my favorite being 'shell: nohup sh -c "sleep 5 ; shutdown -r now" > /dev/null &') 19:50:06 I like the command warnings, but maybe I'm a minority in that 19:51:51 or maybe that functionality could be relocated to ansible-lint? 19:52:04 just hate putting all that regex goo into the command action path 19:52:16 My only other concern with this PR is this line: https://github.com/ansible/ansible/pull/51499/files#diff-82a949ca64b4588912ef7913b1c5c8abR33 19:52:22 Jinx! 19:52:25 I'd be cool with that, I just like *something* to be like "hey, in case you didn't know ..." because I'd wager that not *everyone* reads the release notes and might not know about new modules, such as the `reboot` module 19:52:27 Yeah, I think that kind of thing belongs in opt-in tools 19:52:40 nitzmahone: +1 - I think that's fair 19:53:17 sdoran: yeah, the problem there is that because it's post-fork, you're not getting any benefit from the compiled re (even if you kept it around) 19:53:20 It was somewhat tricky to figure out "is a reboot/shutdown command being issued" since in is almost always chained somehow and not just the first argument. 19:54:19 Ok. I'll just pare this down to some docs suggestions rather than pollute the action plugin with all this complexity. 19:54:25 +1 19:54:34 * cyberpear assumes most don't read the release notes and just complain when things break... 19:54:55 cyberpear: that's me, and I know better 19:55:09 and in general I think the idea of ansible-lint flagging "you should probably be using module X" is a better long-term plan than command warnings 19:55:16 #action sdoran to change PR #51499 to be docs-only 19:55:19 eh, I think we're all guilty of not reading docs at one time or another 19:55:43 I still think docs is a better trade-off than the complexity this introduces. 19:56:02 It was one of those experiences where I stepped back after I made it work and was a bit horrified at what I had wrought. :) 19:56:10 heh 19:56:25 But it was a fun exercise. 19:57:01 Looks like that is all for today. Hopefully we'll get to discuss dw's topic next meeting. 19:57:01 "just because you can..." ;) 19:57:02 Nearly at ti 19:57:07 time* 19:57:14 #topic open floor 19:57:23 For two more minutes. :) 19:57:33 We have a hard stop at the top of the hour today. 19:58:22 Would be useful to have a way to parse arbitrary ini, json, or xml on the controlled machine into a fact-like object 19:58:58 Existing filters don't work for that? 19:59:10 currently, I'm overriding the ansible_local functionality to cover the json and ini cases, but I'm using a hack of making a symlink ending in .fact to make it go 19:59:42 haven't figured a good way to do it for xml, though I've had limited success with the 'xml' module 20:00:04 #endmeeting