20:00:01 #startmeeting Ansible Windows Working Group 20:00:01 Meeting started Tue Nov 9 20:00:01 2021 UTC. 20:00:01 This meeting is logged and archived in a public location. 20:00:01 The chair is nitzmahone. Information about MeetBot at https://fedoraproject.org/wiki/Zodbot#Meeting_Functions. 20:00:01 Useful Commands: #action #agreed #halp #info #idea #link #topic. 20:00:01 The meeting name has been set to 'ansible_windows_working_group' 20:00:04 bah 20:00:08 #chair jborean93 20:00:08 Current chairs: jborean93 nitzmahone 20:00:15 gotta pick up your game 20:00:25 #info agenda https://github.com/ansible/community/issues/581 20:00:49 Actually a couple things today 20:00:56 uh oh, looks like we lost the bot 20:01:02 oh well 20:01:16 zodbot_ is here though :) 20:01:17 hey 20:01:20 #topic community wiki updates 20:01:46 yea it's probably time we update the wiki page 20:02:38 it still goes to 2020 20:02:49 I'll take a stab at it afterwards and try to fix up the egregious stuff 20:02:57 thanks 20:03:00 #action nitzmahone to update wiki 20:03:08 #halp 20:03:20 i am not a bot! .. also not lost, just silent 20:04:03 Most of the folks listed on there haven't been around for awhile- do we want to drop the ones that we haven't seen? 20:04:19 yea, we can always add them back in if they rejoin 20:04:34 ๐Ÿ‘ 20:04:44 sgtm 20:04:55 OK, next up then 20:05:06 #topic https://github.com/ansible/community/issues/581#issuecomment-963785156 (Script Analyzer update) 20:05:37 I'm ok with both of jborean93's suggestions there 20:06:26 If we're going to enable line length limit, I'd probably set to at least 120, and probably 160 20:06:28 we could also add rules to check the brace position if we wish but I thought that might be a step too far 20:06:38 yea we use 160 in Python so that would be it 20:07:16 I still leave my IDEs set for 120, but it's occasionally nice to be able to go longer without doing line continuation craziness 20:07:58 luckily PSSA can do auto correction so it shouldn't be too hard to just fix these in 1 go 20:08:16 Yeah, that's always nice 20:08:37 do we want to look at brace styles or even whitespace rules in statements, i.e. `if ()` vs `if()` 20:09:16 I could go either way- I know the last time we did a big pass on rules it seemed like a number of them were still kinda unsettled in the PS community as a whole 20:10:06 My biggest problems is really the indentation stuff and while I have a preferences for braces I don't really care too much about them 20:10:26 But I know we passed on this because the rules weren't really there to check this stuff but now they are 20:10:51 sorry, had to step away for a few, but back now 20:11:13 I don't have strong feelings either- if we're willing to put a stake in the ground and update the existing stuff to pass, I'm cool with whatever 20:11:32 I definitely think 4 space indentation is easier to read for code, powershell too in this case 20:11:36 (for yaml I like 2 spaces) 20:11:39 ditto 20:11:55 4 space yaml grinds my gears 20:12:28 we could take a layered approach.. don't have to change new rules all at once 20:13:12 Seems like if the tool's going to fix them for us and we're in the neighborhood, any reason *not* to do it all at once? 20:13:50 the only thing holding me back from enforcing brace style is people can be quite picky about it 20:13:54 hm.. auto-remediation sounds dangerous (or at least.. iffy?) 20:14:22 but honestly I think I'm on the side of doing it to enforce consistency rather than the slapstick method we have today 20:14:51 briantist: so far I haven't been bitten by it, it's seems to be quite solid 20:14:59 I don't like auto-remediation in the commit pipeline (eg post-commit hooks or whatever), but I'm generally comfortable using it for a block change pass like this 20:15:25 I definitely would like to see consistency that isn't enforced by humans in code review, so it sounds good to me 20:15:42 cool, I'll add those rules to the PR as well 20:15:52 ๐Ÿ‘ thanks! 20:15:58 should we add an ignore refs file for the large changes? 20:16:00 by that it will do `if (condition) {\n` 20:16:19 I know it doesn't get used automatically, but it'd be nice to be able to opt-in for git blame purposes 20:16:38 I'm not sure I've seen that before, is it a git thing? 20:16:49 yeah, let me find an example 20:16:51 I'm inconsistent about that one myself, so having the tool make the choice solves that :D 20:17:49 didn't read this but looks solid: https://akrabat.com/ignoring-revisions-with-git-blame/ 20:18:21 basically, you can tell git blame to ignore certain revs, very useful for bulk formatting changes. You can store a list of such commits in a file, and commit that 20:18:22 Ah that's clever 20:18:43 people can set it in their local git config to use it automatically, or can specify it manually, etc. 20:18:51 so it's no harm to add such a thing 20:18:59 ah ok so it's a way to tell `git blame` to ignore these revisions, do you know if GitHub uses the file? 20:19:03 TIL- I wasn't aware of `--ignore-rev` 20:19:34 I'm not sure if GitHub uses it actually. Pretty sure vscode extensions like gitlens will respect your git config and use it though 20:19:59 ok, it sounds like a decent thing to do, it's going to be a large change for this stuff so I'll look at adding this 20:20:09 https://github.com/github/feedback/discussions/5033 20:20:36 TIL about all this, thanks for sharing it 20:20:50 looks like one of things a million people want but isn't implemented in GitHub yet ๐Ÿ˜… 20:21:00 lol, it might get there one day 20:21:04 Sounds like GH will eventually support it in some form, so worst case maybe we have to rename/move the file someday 20:21:52 Cool, anything else to talk about on that one? 20:22:07 I don't think so, we seem to have a consensus and I'll push those changes to the PR 20:22:20 it sounds good to me 20:22:31 #action jborean93 to add ignore-rev-file support and enable new PSSA rules 20:22:34 other than the bulk change itself, the enforcement/checking is going into ansible-test right? 20:23:22 yep 20:23:29 will be part of `ansible-test sanity --test pslint` 20:23:40 sweet 20:23:52 and looks like it's already requiring the new version as well, so that should cover it 20:23:56 (in the PR) 20:24:13 the rules are defined at https://github.com/ansible/ansible/blob/devel/test/lib/ansible_test/_util/controller/sanity/pslint/settings.psd1 20:24:28 #topic open floor 20:24:58 We'll wait for any topics until :30 past the hour 20:25:18 jborean93: wanted to ask how the work was coming along (I think in pypsrp?) that would enable ansible in WSL to connect to its Windows host without going through WinRM 20:25:50 I'm a little vague on the details, but the stuff I was trying with GitHub Actions made it come up in my mind again 20:26:24 I've been putting off revisting my PR but it's still ongoing 20:27:10 Currently trying to simplify the existing implementation as currently it's a bit too complex with a lot of moving parts. Once that's done it will need more tests which is always fun 20:27:26 got it 20:27:45 could you remind me what part of that work would enable the scenario I mentioned? 20:27:56 like the PR or just how it works in general? 20:28:27 https://github.com/jborean93/pypsrp/pull/99 is the PR 20:29:27 and it's essentially https://github.com/jborean93/pypsrp/blob/f7b24dac86e0c42763cd954eca2de79909f0fa94/psrp/_process.py that does the communication, data is sent in using the stdin and read from stdout 20:29:57 ahh I see 20:30:25 so we could provide the executable with the native Windows name/path, like `pwsh.exe` instead of `pwsh`, which in WSL will execute with the native version 20:31:28 yep, it should even work with `powershell.exe` 20:32:07 I'm still not sure how to expose this stuff in Ansible but that's a problem for the future :) 20:32:23 I was originally thinking of cloning a "local" connection plugin to implement this kind of thing, but I held off when you mentioned this work. 20:32:31 Heh, that's the part I was just ๐Ÿค” on 20:32:57 That's what I did with the custom connection/shell plugin I created that lets us execute "windows" (powershell) ansible modules natively in Linux with `pwsh` 20:33:14 nitzmahone: yea I'm not sure whether it would be a `psrp_local`, `psrp_ssh`, separate connections or expose it all in the config somewhat, many ways to go about that 20:33:29 It's too bad those abstractions just aren't quite right for the Windows way 20:33:34 right ^ was going to say, we'll have options, with it being available in pypsrp 20:33:36 if you need something sooner rather than later you might have more luck just doing that for now, this probably won't be done until next year 20:34:13 yeah, I might consider an intermediate thing, depends on how critical the need becomes.. right now it's really important 20:34:13 `psrp_inception` 20:34:17 haha 20:34:35 `psrp` = `psrp remoting protocol` 20:34:40 `i_put_some_powershell_in_your_powershell` 20:34:47 lol 20:35:10 `ansible_connection: 'powershell_๐Ÿ•ถ'` 20:35:18 lol 20:35:31 `p๐Ÿ•ถwershell` 20:36:19 anyway, nothing else from me for open floor 20:36:38 OK cool, we'll wrap it up then- til next week! 20:36:42 Thanks all! 20:36:43 thanks everyone 20:36:46 thanks 20:36:48 #endmeeting