00:00:35 #startmeeting Ansible Azure Working Group 00:00:35 Meeting started Thu Mar 21 00:00:35 2019 UTC. 00:00:35 This meeting is logged and archived in a public location. 00:00:35 The chair is nitzmahone. Information about MeetBot at http://wiki.debian.org/MeetBot. 00:00:35 Useful Commands: #action #agreed #halp #info #idea #link #topic. 00:00:35 The meeting name has been set to 'ansible_azure_working_group' 00:00:38 hey all! 00:00:57 #chair yungezz zikalino8265 yuwei 00:00:57 Current chairs: nitzmahone yungezz yuwei zikalino8265 00:00:59 hey 00:01:00 thanks for merging the prs nitzmahone! :-) 00:01:10 no worries ;) 00:01:25 Thanks 00:01:37 a couple of tiny things to take care of on the ones that are left, but easy all around I think 00:02:32 Haven’t check email, what are left 00:02:54 On the rediscache one, uncommenting the tests and using `tag` instead 00:03:02 Ok 00:03:30 On the servicebus one, I really think we should exclude nonsensical status values from the module arg `choices` 00:03:46 (even if the underlying API allows them to be set without an error, that seems like a bug) 00:04:14 eg, Setting a queue to `status: unknown` or `status: deleting` makes no sense 00:04:39 The system can *return* them in that state, but we shouldn't be able to set them that way from the module 00:04:46 It is OK, I will keep necessary ones 00:04:54 👍 00:05:33 I think there’s one contributors Pr on win_rm 00:06:00 Yeah, I've been waiting for confirmation from someone on your end that that's the "right" way to do that (or not) 00:06:12 We discussed whether custom script extension is right way today than win_rm 00:06:22 I talked to compute pm 00:06:44 What did they say? 00:06:48 There’s no preference on using each way 00:07:13 so i think we can merge 00:07:18 Custom script make user could use it in arm when creating vm 00:07:38 Win_rm user could configure it on existing vm 00:07:51 Can they? I wasn't clear on that 00:07:59 * nitzmahone thought it was still just at creation-time 00:08:04 There’s no sign to obsolete win_rm for now 00:08:13 You can 00:08:23 They shared some sample 00:08:35 Let me share it via email offline 00:08:41 ok 00:09:54 Quick question, is there plan for 2.9 till now? 00:10:02 Schedule 00:10:07 i guess october 00:10:12 (ansible fest) 00:10:24 Code freeze? 00:10:47 2.9 schedule has not been determined yet 00:11:10 core freeze is tomorrow, community is next Thursday 00:11:12 Ok 00:11:40 i have one more pr to discuss, actually it's a contributor pr, but i created a copy here: https://github.com/ansible/ansible/pull/53622 00:11:54 So our Pr is community right? 00:12:11 yes 00:12:21 Thanks 00:12:35 nitzmahone if you could look into this, i want to try to push all the changes to the contributor's pr. 00:12:48 now i have a problem, because contributor became not active 00:13:27 sure- so you'll get it working on your WIP one, then push changes back to the original contributor's PR and close 53622? 00:13:28 i think if he doesn't appear within a week we could merge this one, if he appears we could merge his pr 00:13:54 yes, that's my plan 00:14:11 yeah, if you could add a link to the original PR in the temp one, that'd be cool (along with describing what you just said) 00:14:20 but that sounds like a good plan 00:14:50 We can also diddle the commit history to preserve the original submitter's attribution on the lines you don't change 00:15:11 (if we want to just merge your working PR) 00:15:25 yes, original is here: https://github.com/ansible/ansible/pull/44411 00:15:28 i will add the link 00:15:33 sounds good 00:17:04 i have added all the tests and fixed all the issues, so whenever he merges my changes into his branch, his pr will be ready 00:18:50 on https://github.com/ansible/ansible/pull/42400, the only outstanding issue I see (other than lack of tests on the new stuff, but (shrug)) is the None value on license_type either needs to be redone to use !!null or ~ (which should map to Python `None`) 00:19:06 ok, i will change that 00:19:17 zikalino unless he explicitly forbade it, you should be able to add your commits to his branch 00:19:33 (you have commit rights on ansible/ansible, right?) 00:19:50 oh, no, sorry, that's not my pr :-) 00:20:22 we also have a new pr from contributor (maria db): https://github.com/ansible/ansible/pull/53998 00:20:38 this is quite similar to mysql and postgresql 00:21:13 cool 00:21:15 the module has same ux 00:21:27 i think we could handle that if you agree (he has a few modules) 00:21:42 works for me 00:22:02 esp since they're pretty much just copypasta of what you've already done for the others 00:23:18 ok, so i will work with the contributor and make sure all is merged before freeze 00:23:22 great- thanks! 00:23:26 Anything else for today? 00:23:28 and we have one more external: https://github.com/ansible/ansible/pull/44414 00:23:50 Another heads up, Kylie will not work on ansible due to project need, PC will be azure ansible PM, PC IS based at Redmond 00:24:08 is PC here? 00:24:16 I will invite her to this meeting next time 00:24:44 I m not sure has Kylie fwd her the meeting 00:24:45 sounds good 00:24:50 Seems not 00:25:33 44414 looks ok to me at a glance; I see you raised a couple of concerns on review- I don't have any more to add. When you're comfortable with it, go ahead and merge for 2.8 (if before next Thursday) 00:25:49 ok, great, thanks! 00:26:10 Hi all, hope you don't mind if I crash your meeting 00:26:14 :) 00:26:17 Thanks Matt for all the reviews and good comments 00:26:43 no worries 00:26:47 oh, wait 00:26:52 one more thing i wanted to mention 00:27:09 Wicaeed- we'll finish these items then you can have the floor ;) 00:27:13 we had this comment on one of facts prs by bcoca 00:27:14 no worries 00:27:38 Oh yes 00:28:09 here: https://github.com/ansible/ansible/pull/53942 00:28:34 ah... 00:28:50 So we'll be changing that for 2.9, but don't worry about it if it's going in for 2.8 00:29:13 what is going to change? 00:29:20 In 2.9+, those kinds of "read only" modules will use the suffix `_info` unless they're actually returning `ansible_facts` (and should) 00:29:36 So we shouldn’t set facts _module=true in2.8? 00:29:58 oh, so one question is, how we can rename all the facts modules into _info modules wihtout causing major disruption? 00:30:01 *most* things with `_facts` suffix should really be `_info`; we're looking at sane ways to alias 00:30:09 symlinks, probably 00:30:18 yeah, i think there should be some aliasing 00:30:22 rename to `_info` and put a symlink from `_facts` to it 00:30:32 we already have problem with some modules have _underscores_ and some not 00:30:43 yeah, we're not just gonna go rename everything without a compat patch ;) 00:30:59 ok, that sounds good, so we continue now with facts 00:31:19 But if we come up with a consistent policy for that within the azure_rm modules, we can apply those fixes at the same time when we alias them 00:31:22 pls add some comment in that pr :-) 00:31:22 yep 00:31:29 on it 00:32:30 i was actually thinking how azure_..._facts could work properly in some gereric way.... but didn't figure it out yet 00:32:32 done 00:32:38 thx! 00:32:51 Thanks! 00:33:00 ok, anything else, or can Wicaeed have the floor? 00:33:33 Sure 00:33:45 Go ahead Wicaeed- something with azure_rm_virtualmachine? 00:34:21 i think that's all from us. if we have anything additional to be merged before freeze i will send you an e-mail around monday. 00:34:31 sounds good 00:34:33 Hmm, kind of. I was trying to get the azure inventory plugin working with my local ansible installation and having a hell of a time at it, but now I've run into something else entirely 00:34:48 but I was curious, how does the azure inventory plugin handle deprovisioned hosts? 00:35:07 What I'm trying to do is write some Tower tasks to power on and power off Azure VMs 00:35:08 simple stuff 00:35:31 Have you seen the docs for it? 00:35:35 but when I power off and deprovision an Azure VM, the host gets disabled in the inventory, and any subsequent plays skip the hosts 00:35:57 I've seen many docs today while I've been trying to get this to work xD 00:35:59 the default host filters exclude deprovisioned, but you can override if you need: 00:36:02 https://www.irccloud.com/pastebin/MNxzXh79/ 00:36:22 ok, seems like a simple fix, let me give that a shot 00:36:34 so if you set `default_host_filters` to `[]` you should see everything 00:37:10 Most people don't want to see powered-off hosts, but sounds like it's important for your use case (which is why I left that little escape hatch in there ;) ) 00:37:49 haha, fair enough 00:37:50 Thanks for guinea-pigging that plugin; it's pretty new, so definitely a bit raw in some areas 00:37:55 >_< 00:38:11 I couldn't get it work at all from my ansible dev box 00:38:16 but it seems to work in Tower 00:38:21 although Tower uses the old version 00:38:46 Oh, so Tower currently uses the old Azure inventory script 00:39:00 hmm 00:39:10 (which is much slower and pretty much dead-end code) 00:39:11 I actually opened up https://github.com/ansible/ansible/issues/54138 for the issues I was seeing from my Ansible dev box 00:39:31 Getting the Azure SDK deps installed properly is a major PITA 00:40:27 It's just strange that I can get the power state in one task, and then it tells me I have incorrect credentials in the next one 00:40:30 ah 00:40:50 you need to lowercase the keys in the credential file 00:41:12 and ditch the AZURE prefix (that's for envvars) 00:41:34 ahh ok 00:41:36 ill try that 00:41:50 do you happen to know when the new azure_rm.py inventory plugin would be included in Tower? 00:41:54 or how to get it in? 00:41:56 so should just be `subscription`, `ad_user` and `password` in that set of credentials 00:42:01 those conditional groups would save me a ton of headache 00:42:52 TMK the UI for it is shipping with the next release of Tower, but I'm pretty sure you can use it now as a generic inventory plugin (but I haven't played with the Tower UI since they started doing inventory plugin support) 00:43:18 Yeah they don't have a lot of documentation on how to use inventory plugins 00:44:05 So the nice part about it is that the move to the inventory plugin model delegates all that stuff to Ansible itself (instead of Tower having to ship a copy of the plugin/script and execute it directly) 00:44:45 So the plugins available will float with whatever Ansible version you're using (and if you want the "nice" plugin-specific UI from Tower, some version of Tower that supports that) 00:45:05 But I'm pretty sure there's a way to configure generic inventory plugins from Tower 00:45:13 do you know if it's the next major release (Tower 3.5.x) or minor one? 00:45:14 (not scripts, that's the old way) 00:45:18 3.5 IIRC 00:45:27 mmm 00:45:33 We've been working with them to make the upgrade seamless 00:45:37 :D 00:46:07 Do you know off hand if there is a way to not filter out deallocated hosts in the old azure_rm.py plugin? 00:46:11 if you're feeling bleeding edge: https://github.com/ansible/awx/tree/inventory_plugins 00:46:25 * nitzmahone looks real quick 00:48:26 if you set `include_powerstate` to False, it should return everything, but not sure if you can tell if it's running or not 00:48:37 (that's using the old contrib script) 00:49:12 hmm 00:49:24 Actually it looks like it defaults to including it and doesn't filter non-running 00:49:35 huh 00:49:42 so you just have to check the host fact `powerstate` for `running` or something else 00:50:01 yeah that's the issue though, ansible sees no valid hosts for the play 00:50:06 so it skips everything 00:50:22 but I'm not sure if it's a dynamic inventory thing in Tower, or something else 00:50:48 hmm, unless Tower's doing some extra magic there (which it might be) 00:51:53 yeah let me play with the azure inventory plugin on my own host to see if I can't get it to work 00:52:02 * nitzmahone works like 99.99% on core, so not familiar with Tower's intricacies 00:52:10 yeah, nobody is 00:52:12 not even RedHat 00:52:13 xD 00:52:28 * nitzmahone works for Ansible, so ;) 00:52:38 (/Red Hat) 00:52:57 Hi Matt I have a question on new inventory also, with old inventory you can set hosts=azure in playbook to run playbook, but new inventory complaints azure hosts not found so skip, although list could show hosts, should hosts=all? 00:53:35 IIRC the plugin still puts them into a default group (other than all, of course) 00:53:40 * nitzmahone looks 00:53:46 yungezz when you're talking "new" inventory, do you mean hosts you haven't provisioned yet? 00:53:56 but you can use the dynamic group stuff to put them into as many groups as you want 00:54:04 I mean new inventory plugin 00:54:09 ah 00:54:14 yeah that new inventory plugin sounds sweet xD 00:54:18 How to do it? 00:54:52 Sorry not too much experience on dynamic group 00:56:21 https://www.irccloud.com/pastebin/dqikywpn/ 00:57:04 should emulate what you want; it'll place all the hosts found by the inventory plugin into the `azure` group (since the conditional will eval to true for every host) 00:57:25 so add that line to the plugin's .yml config file and you should be good 00:57:45 Wicaeed esp if you have a lot of hosts, it's like an order of magnitude faster too ;) 00:58:25 OK, anything else for today? 00:58:42 btw that default_host_filters things totally works to return all the VMs 00:58:47 awesome 00:58:55 * nitzmahone pats self on back ;) 00:58:56 too bad it's not in tower ;( 00:59:01 wen 3.5? 00:59:16 I think in the next month or so, but not sure 01:00:05 Sorry dropped off. Thanks Matt. I m ok. 01:00:06 hmm, I guess I'll see if I can't get a guide or something from RedHat on how to get it working xD 01:00:45 anyway thanks for the help 01:00:46 One thing you might be able to do 01:00:59 Cool, thanks Catherine- til next week! 01:01:01 #endmeeting