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