20:00:08 #startmeeting Ansible Windows Working Group 20:00:08 Meeting started Tue Jun 26 20:00:08 2018 UTC. 20:00:08 This meeting is logged and archived in a public location. 20:00:08 The chair is jborean93. Information about MeetBot at http://wiki.debian.org/MeetBot. 20:00:08 Useful Commands: #action #agreed #halp #info #idea #link #topic. 20:00:08 The meeting name has been set to 'ansible_windows_working_group' 20:00:12 hey 20:00:33 hey 20:00:39 #chair jhawkesworth_ 20:00:39 Current chairs: jborean93 jhawkesworth_ 20:01:28 o/ 20:01:33 hey 20:01:52 #chair nitzmahone 20:01:52 Current chairs: jborean93 jhawkesworth_ nitzmahone 20:02:28 seems to be just us 3 for today unless someone else joins 20:02:56 I've added a few topics for the agenda today after browsing the GH issues last week 20:03:08 * jhawkesworth_ looks 20:03:39 #topic https://github.com/ansible/community/issues/294#issuecomment-399319602 20:04:10 There is a PR to add support for specifying an alternative URL for sourcing the Chocolatey install script 20:04:16 I think its easy enough to install chocolately locally if you need it 20:04:31 win_copy or win_get_url if you have a local webserver 20:04:58 I don't use chocolatey much but reluctant to add more to the module 20:05:04 those are my thoughts, this should really be something done outside the module and I am loath to add more complexity to win_chocolatey as it is 20:05:23 On the other hand, it is really convenient that it installs it's own dependencies but really isn't correct 20:05:46 I have no objection to having an example in the docs of installing choco.exe from local source 20:06:43 there was some chat on Friday here last week where I think consensus was that a chocolatey_sources module would be the right thing to do, but neither dag or myself use it, so we weren't volunteering 20:06:51 (slight aside) 20:07:01 yea that's something we should look at at some point 20:07:45 its perhaps not obvious to go looking for a chocolatey_sources module unless you happen to be familar with linux package management 20:08:12 perhaps a an ansible chocolatey guide could solve that though 20:08:36 I would say just linking it from chocolatey would probably be enough for now 20:09:06 fair enough 20:09:14 see if it starts causing user questions first 20:09:52 cool 20:09:53 Yeah, if anything, I'd rather just add something to the module that says "don't try to install" 20:11:11 in the case where they try to specify chocolatey as the thing to install? 20:12:24 this is more for when choco.exe is not present and win_chocolatey automatically downloads and installs from a public URL 20:12:31 sort of wish the magic install hadn't happened but can't take it away now 20:12:38 yea same here 20:13:04 * nitzmahone has mixed feelings 20:13:16 It's "neat", but definitely a source of problems. 20:14:14 the question remains do we want to add another param like `install_source` to allow specifying a different URL for the choco install.ps1 script 20:15:15 I'd rather have an example of installing it using `win_get_url` in the documentation than another module parameter 20:15:41 my feelings are the same, would also confuse people when they source `source` and `install_source` 20:16:59 Agreed- we shouldn't add an alt source for the script (but maybe a way to just make it not try to install at all if user wants to handle by some other method) 20:17:24 I guess we could deprecate the silent install in favour of installation examples. 20:17:38 that would be up to them installing it before calling win_chocolatey 20:18:03 Silent install is nice demoware 20:18:04 yeah that way they are in control of what version they have installed 20:18:24 sounds good will update the issue and say thanks but now thanks. Add an example instead 20:18:33 #topic https://github.com/ansible/community/issues/294#issuecomment-399325575 20:19:08 Currently win_regedit does not support keys with `/` in the name. The PS registry provider automatically converts that to a key/path separator 20:19:21 I'd probably suggest using templated win_regmerge or something 20:19:34 yeah that's annoying but its powershell trying to be helpful 20:19:41 this exact thing has come up before 20:19:44 Damn SCHANNEL keys 20:19:48 win_regmerge is not idempotent, plus the .reg file is pretty strict in how it needs to be formatted IIRC 20:19:51 Whoever named those things needs a 2x4 to the head 20:20:13 this guy fixed using win_shell: 20:20:14 https://github.com/deekayen/ansible-role-schannel/blob/master/tasks/windows/ciphers.yml 20:20:45 L70 20:20:48 yea you can get it working but the registry module Ansible uses just won't support it 20:21:03 or it will create a subkey which wouldn't be the intended behaviour 20:21:15 I talked it over a couple times with the Powershell PMs, they were kinda like, "yeah that sucks, but we're probably not going to fix it" 20:21:40 you can use .net to create it 20:21:59 the issue with us doing that is it could break compatibility with someone who already uses `/` as a path separator 20:22:33 Yeah; maybe a "literal_path" or some kind of flag that says "don't try to munge this" 20:22:36 the only saving grace is that you can't do a path like `HKLM:/SOFTWARE/path/to/key`, the root must be `HKLM:\` 20:23:07 so `HKLM:\SOFTARE/path/to/key` currently works and would break in that scenario 20:24:15 I like `literal_path` idea best I think 20:24:33 hmm that could be tricky and complex in the module code 20:24:39 Anything "automatic" we do here is going to break somebody 20:24:52 would have to swap between .net and PS based on that flag 20:25:07 Which is why I dropped it last time it came up ;) 20:25:28 yeah is baggage to carry for 1% of uses otherwise 20:25:54 Tell SCHANNEL team to stop giving their keys names that can't be managed in Powershell 20:25:56 `win_registry_dotnet` module perhaps? 20:26:00 I personally think that someone who did `HKLM:\SOFTARE/path/to/key` would be rare 20:26:35 Yeah, but it's even been in the docs in the past that you can use forward slashes in most cases 20:26:48 really? 20:26:57 I can just imagine someone storing a unix path under a certain point in the registry 20:27:13 but you need to use the backslash for the HKLM:\ part 20:27:15 Given the problems in the past with that, there are almost certainly playbooks out there doing it with K=V syntax or people passing on cmdline or whatever 20:27:20 not sure if it was in the docs but was in my first fest talk I think 20:27:27 so why would someone use \ at the start and then swap to / 20:27:41 It's not been in the docs for that module, but the Windows docs in general in the past have mentioned it 20:27:52 Lack of escaping 20:28:01 (laziness) 20:28:14 I'm not saying we *shouldn't* break them, just saying I'm sure they're out there 20:28:32 I have seen apps which basically have a 'home' registry location ... and then dump all manner of crap in subkeys 20:28:49 ok my vote was to break that and put it in the porting guide for that scenario but if you disagree that's fine 20:28:52 I'm afraid they are out there 20:29:06 Yep. Also constructed subkeys via vars- could be HKLM:\{{stuff}} in the playbook but the var has / 20:29:16 I don't necessarily disagree 20:29:24 nitzmahone true I didn't think of that scenario 20:29:26 Just saying they *are* out there 20:30:11 Question is: do we just hard-break it, or try to do a deprecation cycle? 20:30:44 The latter seems to imply a flag, which gets us into either dual impl or replicating the munging powershell does in the provider ourselves 20:31:03 (neither of which are palatable to me personally) 20:31:03 we can probably detect if `/` is used in the path after the provider and throw a dep warning. Trouble is that it seems like once the key is there it would actually work right now 20:31:09 it's just creating that key where it would fail 20:31:24 yea the dual implementation is not something I want to go down 20:31:29 the module is complex enough as it is 20:32:26 `/` *should* be a pretty corner case; we could just toss it in the porting guide I suppose 20:32:46 yes I vote for that. 20:32:56 you can workaround as we have seen 20:34:16 Still a lot of work to basically completely expunge the Powershell providers... 20:34:31 Well, *some* work 20:34:40 we already use .net for setting properties IIRC 20:34:49 it's more the key side where we still use PS 20:35:22 * jhawkesworth_ is trying not to get annoyed. Its stuff like this that makes powershell still feel like a toy 20:35:46 Meh- just a nasty corner case intersection of two features 20:36:07 jhawkesworth_ maybe if Windows never used `\` as a path separator and based it on `/` 20:36:14 would solve so many issues 20:36:41 yeah very true 20:36:48 ok so we are ok with changing the functionality of `/` to mean the actual key name and not a path sep + porting guide info 20:38:26 * jhawkesworth_ grepping playbooks 20:38:34 we can probably check if `\` is used at all in the path. If not replace `/` with `\` and throw a dep warning saying to specify `\` as a path separator and it will be removed in future versions 20:39:06 the only scenario that would break is if you wanted a root key to have `/` in the name 20:39:29 which sounds like it would be pretty rare 20:40:31 Yep 20:40:36 I can live with that 20:40:46 esp as I have 0 examples in my playbooks 20:41:36 cool will update the agenda item with how we want to move forward in that 20:41:55 last one on the agenda from me 20:41:57 # https://github.com/ansible/community/issues/294#issuecomment-399328025 20:42:01 #topic https://github.com/ansible/community/issues/294#issuecomment-399328025 20:42:55 basically the `creates_version` is only comparing the major.minor.build part of a file version 20:43:07 If a file has .something_else it is ignored 20:43:24 its a bit fiddly but how about having a `creates_version_full` alternative to `creates_version` on win_package 20:43:35 then you could use either 20:44:07 that's one option 20:44:10 as long as docs are clear that full version is exact, creates version ignores the private part 20:44:18 nobodys playbooks get broken 20:44:25 could also have another option that specifies what version to compare it with 20:44:49 I think I'd prefer the latter 20:44:50 yeah that could work 20:44:50 e.g. has options like `major, minor, build, raw` and allows something to specify the version based on that 20:45:05 wording up for debate :) 20:45:07 Oh, I thought you meant which property 20:45:31 Basically default works as it does today, but you can override to compare a different property version 20:45:33 yeah iirc there are typically a bunch of properties in the registry's uninstall stuff 20:45:58 there's also that, the trouble with going with the property is that someone would need to know the names of properties. Simple enough to give an example for people to use though 20:46:19 that would be quite good as there's sod all consistency about what uninstall properties get populated in my experience 20:46:50 This is also arguably a very minor corner case 20:47:01 indeed 20:47:19 yep cool, so add extra option to specify the version property to compare it with 20:47:33 for folks who don't want to look in the registry and used product_id, I think this version appears in the installed programs list 20:47:39 Typical end-users aren't installing different patch versions of the same major/minor/build; this is almost certainly a CI case or something 20:48:19 We can specify a valid list of values as well (if it's what I'm thinking) 20:48:53 do we want the list of values to be word for word based on the Version properties or Ansiblised naming? 20:49:22 Given how rarely it's likely to be used, I'd just go for the raw PS prop names 20:49:41 cool, keeps things simmple 20:51:07 yep happy with that 20:51:31 sounds good to me 20:51:34 #topic open floor 20:51:36 if you need to be really specific, you'll have to go for a dive into the registry anyway 20:52:18 I'm contemplating `win_active_hours` module for later windows so you can set active hours. 20:52:45 👍 20:52:49 need to read some more as I think to be useful you might want to also specify reboot time 20:53:07 which Ihaven't yet seen an example of tweaking via PS 20:54:04 also not sure about validating the active hours window size, which I believe started at 12 hours but in some later builds is 18 hours 20:54:43 nothing else from me (need to finish Fest talk proposal!) 20:54:45 I've heard some pretty gnarly stuff about the active hours and windows automatic reboot behaviour 20:55:39 yep I'm all good, just trying to get through the backlog of PRs and Issues I left lingering. Hopefully get through most of the active ones by the end of this week 20:56:36 we have some clusters which run across a lot of nodes, I really want a way to make sure they aren't all going to reboot at the same time 20:58:40 cool, if there's nothing else will bring it to a close 20:58:47 thanks all 20:59:27 #endmeeting