feat: add test for Rocky Linux 8 #1
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
cups_version: 2.3.1
|
cups_version: 2.3.3op2
|
||||||
|
|
||||||
# @var cups_packages_extra:description: >
|
# @var cups_packages_extra:description: >
|
||||||
# Install dependencies or custom driver packages
|
# Install dependencies or custom driver packages
|
||||||
@ -16,8 +16,8 @@ cups_selinux_restorecon: []
|
|||||||
|
|
||||||
cups_admin_group: printadmin
|
cups_admin_group: printadmin
|
||||||
cups_admin_users:
|
cups_admin_users:
|
||||||
- name: 'cupsadm'
|
- name: "cupsadm"
|
||||||
password: 'secure'
|
password: "secure"
|
||||||
|
|
||||||
cups_bind_url:
|
cups_bind_url:
|
||||||
- localhost:631
|
- localhost:631
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Restart service
|
- name: Restart service
|
||||||
service:
|
service:
|
||||||
name: org.cups.cupsd
|
name: cups
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
@ -8,7 +8,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
|
|
||||||
|
|
||||||
def test_cups_running_and_enabled(host):
|
def test_cups_running_and_enabled(host):
|
||||||
cups = host.service("org.cups.cupsd")
|
cups = host.service("cups")
|
||||||
assert cups.is_running
|
assert cups.is_running
|
||||||
assert cups.is_enabled
|
assert cups.is_enabled
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
|
|
||||||
|
|
||||||
def test_cups_running_and_enabled(host):
|
def test_cups_running_and_enabled(host):
|
||||||
cups = host.service("org.cups.cupsd")
|
cups = host.service("cups")
|
||||||
assert cups.is_running
|
assert cups.is_running
|
||||||
assert cups.is_enabled
|
assert cups.is_enabled
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
- name: Install cups
|
- name: Install cups
|
||||||
package:
|
package:
|
||||||
name: "{{ cups_packages | default(__cups_packages) }}"
|
name: "{{ cups_packages | default(__cups_packages) }}"
|
||||||
|
disable_gpg_check: yes
|
||||||
state: present
|
state: present
|
||||||
notify: __cupsd_restart
|
notify: __cupsd_restart
|
||||||
|
|
||||||
@ -31,12 +32,5 @@
|
|||||||
module_arguments: "{{ item.arguments | default(omit) }}"
|
module_arguments: "{{ item.arguments | default(omit) }}"
|
||||||
new_module_path: "{{ item.new_module }}"
|
new_module_path: "{{ item.new_module }}"
|
||||||
loop: "{{ __pam_config }}"
|
loop: "{{ __pam_config }}"
|
||||||
|
|
||||||
- name: Replace default systemd unit
|
|
||||||
template:
|
|
||||||
src: "etc/systemd/system/org.cups.cupsd.service.j2"
|
|
||||||
dest: "/etc/systemd/system/org.cups.cupsd.service"
|
|
||||||
mode: 0640
|
|
||||||
notify: __cupsd_restart
|
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
become_user: root
|
||||||
|
@ -1,4 +1,16 @@
|
|||||||
---
|
---
|
||||||
|
- include_vars: "{{ var_files }}"
|
||||||
|
vars:
|
||||||
|
var_files: "{{ lookup('first_found', params, errors='ignore') }}"
|
||||||
|
params:
|
||||||
|
files:
|
||||||
|
- "{{ ansible_lsb.id | default('') | lower }}.yml"
|
||||||
|
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version }}.yml"
|
||||||
|
- "{{ ansible_os_family | lower }}.yml"
|
||||||
|
paths:
|
||||||
|
- "vars"
|
||||||
|
when: var_files
|
||||||
|
|
||||||
- include_tasks: prepare.yml
|
- include_tasks: prepare.yml
|
||||||
- include_tasks: install.yml
|
- include_tasks: install.yml
|
||||||
- include_tasks: selinux.yml
|
- include_tasks: selinux.yml
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure cups service is up and running
|
- name: Ensure cups service is up and running
|
||||||
service:
|
service:
|
||||||
name: org.cups.cupsd
|
name: cups
|
||||||
state: started
|
state: started
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
@ -14,6 +14,12 @@ DefaultEncryption Never
|
|||||||
LogLevel {{ cups_log_level | lower }}
|
LogLevel {{ cups_log_level | lower }}
|
||||||
PageLogFormat
|
PageLogFormat
|
||||||
|
|
||||||
|
# Specifies the maximum size of the log files before they are rotated. The value "0" disables log rotation.
|
||||||
|
MaxLogSize 1m
|
||||||
|
|
||||||
|
# Default error policy for printers
|
||||||
|
ErrorPolicy stop-printer
|
||||||
|
|
||||||
# Only listen for connections from the local machine.
|
# Only listen for connections from the local machine.
|
||||||
{% for item in cups_bind_url %}
|
{% for item in cups_bind_url %}
|
||||||
Listen {{ item }}
|
Listen {{ item }}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#jinja2: lstrip_blocks: True
|
|
||||||
{{ ansible_managed | comment }}
|
|
||||||
[Unit]
|
|
||||||
Description=CUPS Scheduler
|
|
||||||
Documentation=man:cupsd(8)
|
|
||||||
After=sssd.service network.target
|
|
||||||
Wants=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/sbin/cupsd -l
|
|
||||||
Type=simple
|
|
||||||
Restart=on-failure
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
Also=org.cups.cupsd.socket org.cups.cupsd.path
|
|
||||||
WantedBy=printer.target
|
|
@ -1,10 +1,10 @@
|
|||||||
---
|
---
|
||||||
__cups_download_url: https://gitea.rknet.org/rpmbuild/cups/releases/download/v{{ cups_version }}
|
__cups_download_url: https://gitea.rknet.org/rpmbuild/cups/releases/download/v{{ cups_version }}
|
||||||
__cups_packages:
|
__cups_packages:
|
||||||
- "{{ __cups_download_url }}/cups-{{ cups_version }}-0.x86_64.rpm"
|
- "{{ __cups_download_url }}/cups-{{ cups_version }}-0.el{{ ansible_distribution_major_version }}.x86_64.rpm"
|
||||||
- "{{ __cups_download_url }}/cups-devel-{{ cups_version }}-0.x86_64.rpm"
|
- "{{ __cups_download_url }}/cups-devel-{{ cups_version }}-0.el{{ ansible_distribution_major_version }}.x86_64.rpm"
|
||||||
- "{{ __cups_download_url }}/cups-libs-{{ cups_version }}-0.x86_64.rpm"
|
- "{{ __cups_download_url }}/cups-libs-{{ cups_version }}-0.el{{ ansible_distribution_major_version }}.x86_64.rpm"
|
||||||
- "{{ __cups_download_url }}/cups-lpd-{{ cups_version }}-0.x86_64.rpm"
|
- "{{ __cups_download_url }}/cups-lpd-{{ cups_version }}-0.el{{ ansible_distribution_major_version }}.x86_64.rpm"
|
||||||
|
|
||||||
__pam_config:
|
__pam_config:
|
||||||
- type: "auth"
|
- type: "auth"
|
||||||
|
Loading…
Reference in New Issue
Block a user