2017-05-27 18:09:50 +00:00
# administer this service by browsing to localhost:631
- name : get the CUPS package installed
package : name={{ item }}
state=present
with_items :
- cups
when : cups_install
tags :
- download
2017-10-19 06:33:02 +00:00
2017-05-27 18:09:50 +00:00
- name : Put our own config file in place, to permit local lan admin
template : dest=/etc/cups/cupsd.conf
src=cupsd.conf
- name : Put an apache2 config file in place
template : dest=/etc/{{ apache_config_dir }}/
src=cups.conf
- name : Create the link for sites-enabled
file : src=/etc/apache2/sites-available/cups.conf
dest=/etc/apache2/sites-enabled/cups.conf
state=link
2017-05-27 23:10:45 +00:00
when : cups_enabled and is_debuntu
2017-05-27 18:09:50 +00:00
- name : Enable services for cups
service : name={{ item }}
state=started
enabled=yes
with_items :
- cups
- cups-browsed
when : cups_enabled and not is_F18
2017-10-27 06:43:56 +00:00
- name : Enable services for cups for XO laptops
2017-05-27 18:09:50 +00:00
service : name=cups
state=started
enabled=yes
when : cups_enabled and is_F18
- name : Permit headless admin of CUPS -- only works when cups daemon is running
shell : "cupsctl --remote-admin"
when : cups_enabled
- name : Disable services for cups
service : name={{ item }}
state=stopped
enabled=no
with_items :
- cups
- cups-browsed
when : not cups_enabled and not is_F18
2017-10-27 06:43:56 +00:00
- name : Disable services for cups for XO laptops
2017-05-27 18:09:50 +00:00
service : name=cups
state=stopped
enabled=no
when : not cups_enabled and is_F18
- name : add cups to service list
ini_file : dest={{ service_filelist }}
section=cups
option={{ item.option }}
value={{ item.value }}
with_items :
- option : name
value : '"Common UNIX Printing System (CUPS)"'
- option : description
value : '"CUPS is a modular printing system which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer."'
- option : installed
value : "{{ cups_install }}"
- option : enabled
value : "{{ cups_enabled }}"