mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Update main.yml
This commit is contained in:
parent
f1c049a6e1
commit
3ca4ef8599
1 changed files with 39 additions and 30 deletions
|
@ -1,40 +1,46 @@
|
||||||
# administer this service by browsing to localhost:631
|
# administer this service by browsing to localhost:631
|
||||||
- name: Get the CUPS package installed
|
- name: Get the CUPS package installed
|
||||||
package: name={{ item }}
|
package:
|
||||||
state=present
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- cups
|
- cups
|
||||||
when: cups_install
|
when: cups_install
|
||||||
tags:
|
tags:
|
||||||
- download
|
- download
|
||||||
|
|
||||||
- name: Put our own config file in place, to permit local LAN admin
|
- name: Put our own /etc/cups/cupsd.conf in place, to permit local LAN admin
|
||||||
template: dest=/etc/cups/cupsd.conf
|
template:
|
||||||
src=cupsd.conf
|
src: cupsd.conf
|
||||||
|
dest: /etc/cups/cupsd.conf
|
||||||
|
|
||||||
- name: Put an apache2 config file in place
|
- name: Put an apache2 config file in place
|
||||||
template: dest=/etc/{{ apache_config_dir }}/
|
template:
|
||||||
src=cups.conf
|
src: cups.conf
|
||||||
|
dest: "/etc/{{ apache_config_dir }}/"
|
||||||
|
|
||||||
- name: Create the link for sites-enabled
|
- name: Create the link for sites-enabled (debuntu)
|
||||||
file: src=/etc/apache2/sites-available/cups.conf
|
file:
|
||||||
dest=/etc/apache2/sites-enabled/cups.conf
|
src: /etc/apache2/sites-available/cups.conf
|
||||||
state=link
|
dest: /etc/apache2/sites-enabled/cups.conf
|
||||||
|
state: link
|
||||||
when: cups_enabled and is_debuntu
|
when: cups_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Enable services for CUPS (OS's other than Fedora 18)
|
- name: Enable services for CUPS (OS's other than Fedora 18)
|
||||||
service: name={{ item }}
|
service:
|
||||||
state=started
|
name: "{{ item }}"
|
||||||
enabled=yes
|
state: started
|
||||||
|
enabled: yes
|
||||||
with_items:
|
with_items:
|
||||||
- cups
|
- cups
|
||||||
- cups-browsed
|
- cups-browsed
|
||||||
when: cups_enabled and not is_F18
|
when: cups_enabled and not is_F18
|
||||||
|
|
||||||
- name: Enable services for CUPS (Fedora 18, for XO laptops)
|
- name: Enable services for CUPS (Fedora 18, for XO laptops)
|
||||||
service: name=cups
|
service:
|
||||||
state=started
|
name: cups
|
||||||
enabled=yes
|
state: started
|
||||||
|
enabled: yes
|
||||||
when: cups_enabled and is_F18
|
when: cups_enabled and is_F18
|
||||||
|
|
||||||
- name: Permit headless admin of CUPS -- only works when CUPS daemon is running
|
- name: Permit headless admin of CUPS -- only works when CUPS daemon is running
|
||||||
|
@ -42,30 +48,33 @@
|
||||||
when: cups_enabled
|
when: cups_enabled
|
||||||
|
|
||||||
- name: Disable services for CUPS (OS's other than Fedora 18)
|
- name: Disable services for CUPS (OS's other than Fedora 18)
|
||||||
service: name={{ item }}
|
service:
|
||||||
state=stopped
|
name: "{{ item }}"
|
||||||
enabled=no
|
state: stopped
|
||||||
|
enabled: no
|
||||||
with_items:
|
with_items:
|
||||||
- cups
|
- cups
|
||||||
- cups-browsed
|
- cups-browsed
|
||||||
when: not cups_enabled and not is_F18
|
when: not cups_enabled and not is_F18
|
||||||
|
|
||||||
- name: Disable services for CUPS (Fedora 18, for XO laptops)
|
- name: Disable services for CUPS (Fedora 18, for XO laptops)
|
||||||
service: name=cups
|
service:
|
||||||
state=stopped
|
name: cups
|
||||||
enabled=no
|
state: stopped
|
||||||
|
enabled: no
|
||||||
when: not cups_enabled and is_F18
|
when: not cups_enabled and is_F18
|
||||||
|
|
||||||
- name: Add 'cups' to service list
|
- name: Add 'cups' to list of services at /etc/iiab/iiab.ini
|
||||||
ini_file: dest={{ service_filelist }}
|
ini_file:
|
||||||
section=cups
|
dest: "{{ service_filelist }}"
|
||||||
option={{ item.option }}
|
section: cups
|
||||||
value={{ item.value }}
|
option: "{{ item.option }}"
|
||||||
|
value: "{{ item.value }}"
|
||||||
with_items:
|
with_items:
|
||||||
- option: name
|
- option: name
|
||||||
value: '"Common UNIX Printing System (CUPS)"'
|
value: CUPS
|
||||||
- option: description
|
- 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."'
|
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."'
|
||||||
- option: installed
|
- option: installed
|
||||||
value: "{{ cups_install }}"
|
value: "{{ cups_install }}"
|
||||||
- option: enabled
|
- option: enabled
|
||||||
|
|
Loading…
Reference in a new issue