Created
August 18, 2012 20:03
-
-
Save grahamgilbert/3389457 to your computer and use it in GitHub Desktop.
Location based printer setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case $operatingsystem{ | |
Darwin:{ | |
##London is on the 10.30.2.0 and 10.30.3.0 Subnets | |
if ($network_en0 == '10.30.2.0') or ($network_en1 == '10.30.2.0') or ($network_en0 == '10.30.3.0') or ($network_en1 == '10.30.3.0'){ | |
printer { "Sharp_ARM316": | |
ensure => present, | |
uri => "lpd://sharparm316.ldn.example.com", | |
description => "Sharp ARM316", | |
shared => false, | |
ppd => "/Library/Printers/PPDs/Contents/Resources/SHARP AR-M316.PPD.gz", # PPD file will be autorequired | |
} | |
printer { "Xerox_WorkCentre_7120": | |
ensure => present, | |
uri => "lpd://xeroxwc7120.ldn.example.com", | |
description => "Xerox WorkCentre 7120", | |
shared => false, | |
ppd => "/Library/Printers/PPDs/Contents/Resources/Xerox WorkCentre 7120.gz", # PPD file will be autorequired | |
} | |
} | |
##San Francisco is on the 10.30.10.0 Subnet | |
if ($network_en0 == '10.30.10.0') or ($network_en1 == '10.30.10.0'){ | |
printer { "Xerox_550": | |
ensure => present, | |
uri => "lpd://xerox550.sf.example.com", | |
description => "Xerox 550", | |
shared => false, | |
ppd => "/Library/Printers/PPDs/Contents/Resources/en.lproj/Xerox 550-560 Integrated Fiery", # PPD file will be autorequired | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment