Changeset 477


Ignore:
Timestamp:
Dec 9, 2009, 12:01:38 AM (13 years ago)
Author:
sebas
Message:

agregamos para rechazar trabajo y desactivar la impresora

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/puppet/modules/cups/manifests/init.pp

    r476 r477  
    122122    }
    123123  } else {
     124    exec { "cupsreject_$name":
     125      command => "cupsreject $printer",
     126      path => "/bin:/sbin:/usr/sbin:/usr/bin",
     127      unless => "grep -A8 $printer /etc/cups/printers.conf | grep 'Accepting No'",
     128      require => exec["cups_create_printer_$name"],
     129    }
    124130    debug ("'$printer' will not accept print jobs")
    125131  }
     
    133139    }
    134140  } else {
     141    exec { "cupsdisable_$name":
     142      command => "cupsdisable $printer",
     143      path => "/bin:/sbin:/usr/sbin:/usr/bin",
     144      unless => "grep -A5 $printer /etc/cups/printers.conf | grep 'State Stopped'",
     145      require => exec["cups_create_printer_$name"],
     146    }
    135147    debug ("'$printer' is disabled")
    136148  }
Note: See TracChangeset for help on using the changeset viewer.