IPv4 addresses in conditional_item comparisons

24 views
Skip to first unread message

Greg Neagle

unread,
Mar 1, 2012, 8:16:56 PM3/1/12
to munk...@googlegroups.com
Directing your attention here:


Feedback desired!

-Greg

Greg Neagle

unread,
Mar 1, 2012, 10:35:46 PM3/1/12
to munk...@googlegroups.com
Whoops. Small oversight; this one should actually work...

Per Olofsson

unread,
Mar 2, 2012, 4:47:15 AM3/2/12
to <munki-dev@googlegroups.com>

"IP Address added as a conditional_items attribute" is rather vague. That said, an array of IPv4 addresses should work fine for solving some problems on some networks (e.g. install a package to machines on a certain range of public IPs that don't move to other networks a lot). If you have to deal with laptops on private IP addresses that visit NAT:ed home routers things turn ugly real quick. In MunkiReport there's a /lookup/ip method to help with connectivity checks for Munki runs.

I recently had to solve the problem of "Only start backups when machines are on the university network, but not on wireless or over VPN", which required inspecting which interface is active for routing traffic to our backup server.

It all comes down to what you're trying to solve. That said, I'm all for adding more conditional_items, the more the better. We're making extensive use of smart groups in Absolute Manage, which is basically the same thing, where clients' OU and AD group membership control software distribution.

--
Per Olofsson, IT-service, University of Gothenburg

Greg Neagle

unread,
Mar 2, 2012, 9:48:17 AM3/2/12
to munk...@googlegroups.com
I don't think I'll ever use the ipv4_address attribute for anything myself, but I can see where it might be useful in some environments.

I had planned on eventually extending the mechanism so that administrators could define additional arbitrary attributes (and maybe even override existing attributes), but I was recently contacted by a list participant who is working on this very thing, so I'll wait and see what he's come up with...

-Greg

Matt J

unread,
Mar 2, 2012, 3:40:11 PM3/2/12
to munki-dev
Just did some testing with the ipv4_address attribute and it works as
expected. Thank you!

Matt Johnson
Seattle Public Schools

Joe Wollard

unread,
Mar 3, 2012, 1:43:25 PM3/3/12
to munk...@googlegroups.com
If we wanted to make this a little more extensible without straying too far from convention, I believe Apple's PackageMaker will allow you to use any property supported by sysctl as a condition. http://www.unix.com/man-page/OSX/8/sysctl/ - just throwing in a few cents.
--
--
Joe Wollard

Joe Wollard

unread,
Mar 3, 2012, 1:45:15 PM3/3/12
to munk...@googlegroups.com
although, it should be noted that sysctl doesn't provide any information at all about IP addresses. That wasn't to say that I think the idea of ipv4_address is a bad one at all.
--
--
Joe Wollard

Reply all
Reply to author
Forward
0 new messages