Skip to content

Instantly share code, notes, and snippets.

Created January 4, 2016 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/7a70b60b33370adeaae2 to your computer and use it in GitHub Desktop.
Save anonymous/7a70b60b33370adeaae2 to your computer and use it in GitHub Desktop.
# Service cups, restart if priners.conf was edited
cups_up:
service.running:
- name: cups
- enable: True
- watch:
- file: /etc/cups/printers.conf
cups_down:
service.dead:
- name: cups
- prereq:
- file: Add Brother printer
# Add Brother Printer
Add Brother printer:
file.replace:
- name: /etc/cups/printers.conf
- pattern: <DefaultPrinter Printer_Brother>
- repl: <DefaultPrinter Printer_Brother>
- append_if_not_found: True
- not_found_content: |
<DefaultPrinter Printer_Brother>
AuthInfoRequired none
Info Printer_Brother
Location admin-x-010
DeviceURI ipp://admin-x-010:631/printers/Brother_HL_2240D_series
State Idle
Type 6
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment