Skip to content

Commit

Permalink
fix compilation error when there is no default printer defined
Browse files Browse the repository at this point in the history
  • Loading branch information
tequeter committed Jun 21, 2016
1 parent cd285e9 commit a3acc8f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

$printers_def = {
ensure => present,
before => Exec['default_printer'],
require => Class['::cups::service'],
}
$printers = hiera_hash('cups::printers', {})
Expand All @@ -41,7 +40,7 @@
command => "lpoptions -d ${default_printer}",
unless => "grep -q \'^Default ${default_printer}$\' /etc/cups/lpoptions",
path => ['/usr/local/bin', '/usr/bin', '/bin'],
require => Class['::cups::service'],
require => [ Class['::cups::service'], Printer[keys($printers)], ],
}
}
}

0 comments on commit a3acc8f

Please sign in to comment.