1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/cups/tasks/main.yml

80 lines
2.2 KiB
YAML
Raw Normal View History

2017-05-27 18:09:50 +00:00
# administer this service by browsing to localhost:631
2019-02-03 00:36:59 +00:00
- name: Install 'cups' package
2017-12-08 11:58:15 +00:00
package:
2018-10-28 16:27:21 +00:00
name: cups
2017-12-08 11:58:15 +00:00
state: present
when: cups_install | bool
2017-05-27 18:09:50 +00:00
tags:
- download
2018-10-31 18:59:28 +00:00
- name: Install our own /etc/cups/cupsd.conf from template, to permit local LAN admin
2017-12-08 11:58:15 +00:00
template:
src: cupsd.conf
dest: /etc/cups/cupsd.conf
2017-05-27 18:09:50 +00:00
2018-10-31 05:54:27 +00:00
- name: Install /etc/{{ apache_config_dir }}/cups.conf from template
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
2018-10-31 05:54:27 +00:00
- name: Create symlink cups.conf from sites-enabled to sites-available (debuntu)
2017-12-08 11:58:15 +00:00
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
2018-10-31 05:54:27 +00:00
- name: Enable & Start services 'cups' and 'cups-browsed' (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
2018-10-31 05:54:27 +00:00
- name: Enable & Start service 'cups' (Fedora 18, for XO laptops)
systemd:
2017-12-08 11:58:15 +00:00
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 | bool
2017-05-27 18:09:50 +00:00
2018-10-31 05:54:27 +00:00
- name: Disable both CUPS services (OS's other than Fedora 18)
systemd:
2017-12-08 11:58:15 +00:00
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)
2018-10-31 05:54:27 +00:00
systemd:
2017-12-08 11:58:15 +00:00
name: cups
state: stopped
enabled: no
2017-05-27 18:09:50 +00:00
when: not cups_enabled and is_F18
2018-10-31 05:54:27 +00:00
- name: Add 'cups' variable values to {{ iiab_ini_file }}
2017-12-08 11:58:15 +00:00
ini_file:
2018-10-31 05:54:27 +00:00
path: "{{ iiab_ini_file }}"
2017-12-08 11:58:15 +00:00
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 }}"
0.3 patch1 (#1377) * expand zim_versions_idx to include menuItem name, mediaCount, articleCount, size * create a stub menuItem if none exists * remember to change consumer of zim_version_idx in iiab-admin * comment out some debugging prints * do not change the name of a variable in iiab.ini * consistent variable names for *_enabled * start work on menus for enabled iiab roles * changes to display cups in home menu * remove reference to admin console which may not be installed * print error message * dict.get errors * handle undefined menuItem" * handle undefined menuItem again * some work on logos * break out the zim_versions_idx routines for use by update_menus in admin-console * remove old menuDef creation code * new variable names for zim_versions_idx * missing the tags data in zim_versions_idx * un-break-apart iiab-make-kiwix-lib.py * return an empty string * make size human_readable * getting console and iiab to work together on menus * add the new zim_date field to zim_versions_idx * get the latest into repo * found lost code iiab-make-kiwix-lib.py * Create Lokole admin user during setup * Add requested content to lokole readme Per iiab/iiab#1293 * Update default password * Add Lokole-IIAB user manual * Update default_vars.yml * Update local_vars_min.yml * Update local_vars_min.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update default_vars.yml * Update default_vars.yml * Update local_vars_min.yml * Update local_vars_medium.yml * Update local_vars_big.yml * Update default_vars.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Change admin username to uppercase * Revert "Lokole: change admin to Admin per IIAB app norms" * Update main.yml * Update README.rst * Update capture-wsgi.py * Update main.yml * Update main.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update default_vars.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_min.yml * Address TODOs in Lokole documentation See https://github.com/ascoderu/opwen-webapp/issues/81 * Update main.yml * Update local_vars_big.yml * Update local_vars_medium.yml * Update local_vars_big.yml * Update local_vars_min.yml * Update default_vars.yml * expand zim_versions_idx to include menuItem name, mediaCount, articleCount, size * create a stub menuItem if none exists * remember to change consumer of zim_version_idx in iiab-admin * comment out some debugging prints * do not change the name of a variable in iiab.ini * consistent variable names for *_enabled * start work on menus for enabled iiab roles * changes to display cups in home menu * remove reference to admin console which may not be installed * print error message * dict.get errors * handle undefined menuItem" * handle undefined menuItem again * some work on logos * break out the zim_versions_idx routines for use by update_menus in admin-console * remove old menuDef creation code * new variable names for zim_versions_idx * missing the tags data in zim_versions_idx * un-break-apart iiab-make-kiwix-lib.py * return an empty string * make size human_readable * getting console and iiab to work together on menus * add the new zim_date field to zim_versions_idx * get the latest into repo * found lost code iiab-make-kiwix-lib.py
2019-01-10 22:26:47 +00:00
- option: cups_enabled
2017-05-27 18:09:50 +00:00
value: "{{ cups_enabled }}"