Changeset 471
- Timestamp:
- Dec 8, 2009, 2:55:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/puppet/modules/cups/manifests/init.pp
r469 r471 1 1 # copyright koumbit.org 2 2 # Licence: GPL 3 4 class cups { 5 service { "cups": 6 enable => true, 7 ensure => running, 8 subscribe => [ Package["cupsys"], File["/etc/cups/cupsd.conf"] ], 9 } 10 11 } 3 12 4 13 class cups::server { … … 19 28 owner => "root", group => "lp", mode => "600", 20 29 } 21 22 23 # service { "cups":24 # enable => true,25 # ensure => running,26 # subscribe => [ Package["cupsys"], File["/etc/cups/cupsd.conf"] ],27 # }28 30 } 29 31 30 define cups::printer ($printer, $p_deviceuri, $p_description, $p_location, $p_pathppd = "", $p_ppd = "", $p_filter = "", $p_accept = "", $p_enable = "" )32 define cups::printer ($printer, $p_deviceuri, $p_description, $p_location, $p_pathppd = "", $p_ppd = "", $p_filter = "", $p_accept = "", $p_enable = "", $p_scan = "" ) 31 33 { 32 34 include cups::server … … 89 91 } 90 92 91 # service { "cups": 92 # enable => true, 93 # ensure => running, 94 # subscribe => [ Package["cupsys"], File["/etc/cups/printers.conf"] ], 95 # } 93 if $p_scan { 94 package { "sane-utils": ensure => "installed" } 95 96 line { saned_activate_off: 97 file => "/etc/default/saned", 98 line => 'RUN=no', 99 ensure => absent, 100 require => Package["sane-utils"], 101 notify => Service["saned"], 102 } 103 104 line { saned_activate_on: 105 file => "/etc/default/tftpd-hpa", 106 line => 'RUN=yes', 107 ensure => present, 108 require => Package["sane-utils"], 109 notify => Service["saned"], 110 } 111 } else { 112 debug ("'$printer' cannot scan on the network") 113 } 114 96 115 } 97 116 98
Note: See TracChangeset
for help on using the changeset viewer.