2017-05-27 18:09:50 +00:00
# administer this service by browsing to localhost:631
2017-11-03 16:42:04 +00:00
- name : Get the CUPS package installed
2017-12-08 11:58:15 +00:00
package :
name : "{{ item }}"
state : present
2017-05-27 18:09:50 +00:00
with_items :
- cups
when : cups_install
tags :
- download
2017-10-19 06:33:02 +00:00
2017-12-08 11:58:15 +00:00
- name : Put our own /etc/cups/cupsd.conf in place, to permit local LAN admin
template :
src : cupsd.conf
dest : /etc/cups/cupsd.conf
2017-05-27 18:09:50 +00:00
- name : Put an apache2 config file in place
2017-12-08 11:58:15 +00:00
template :
src : cups.conf
dest : "/etc/{{ apache_config_dir }}/"
2017-05-27 18:09:50 +00:00
2017-12-08 11:58:15 +00:00
- name : Create the link for sites-enabled (debuntu)
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
2017-11-05 07:50:08 +00:00
- name : Enable services for CUPS (OS's other than Fedora 18)
2017-12-08 11:58:15 +00:00
service :
name : "{{ item }}"
state : started
enabled : yes
2017-05-27 18:09:50 +00:00
with_items :
- cups
- cups-browsed
when : cups_enabled and not is_F18
2017-11-05 07:50:08 +00:00
- name : Enable services for CUPS (Fedora 18, for XO laptops)
2017-12-08 11:58:15 +00:00
service :
name : cups
state : started
enabled : yes
2017-05-27 18:09:50 +00:00
when : cups_enabled and is_F18
2017-11-03 16:42:04 +00:00
- name : Permit headless admin of CUPS -- only works when CUPS daemon is running
2017-05-27 18:09:50 +00:00
shell : "cupsctl --remote-admin"
when : cups_enabled
2017-11-05 07:50:08 +00:00
- name : Disable services for CUPS (OS's other than Fedora 18)
2017-12-08 11:58:15 +00:00
service :
name : "{{ item }}"
state : stopped
enabled : no
2017-05-27 18:09:50 +00:00
with_items :
- cups
- cups-browsed
when : not cups_enabled and not is_F18
2017-11-05 07:50:08 +00:00
- name : Disable services for CUPS (Fedora 18, for XO laptops)
2017-12-08 11:58:15 +00:00
service :
name : cups
state : stopped
enabled : no
2017-05-27 18:09:50 +00:00
when : not cups_enabled and is_F18
2017-12-08 11:58:15 +00:00
- name : Add 'cups' to list of services at /etc/iiab/iiab.ini
ini_file :
dest : "{{ service_filelist }}"
section : cups
option : "{{ item.option }}"
value : "{{ item.value }}"
2017-05-27 18:09:50 +00:00
with_items :
- option : name
2017-12-08 11:58:15 +00:00
value : CUPS
2017-05-27 18:09:50 +00:00
- option : description
2017-12-08 11:58:15 +00:00
value : '"CUPS (Common UNIX Printing System) is a modular printing system that 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."'
2017-05-27 18:09:50 +00:00
- option : installed
value : "{{ cups_install }}"
- option : enabled
value : "{{ cups_enabled }}"