feat(server/cups): implement CUPS role

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-12 14:58:28 +02:00
parent d5137bc5fb
commit 34798fd196
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8
2 changed files with 31 additions and 0 deletions

View file

@ -0,0 +1,7 @@
---
- name: Install the cups and deps
ansible.builtin.package:
name:
- cups
- hplip
state: present

View file

@ -0,0 +1,24 @@
---
- name: Packages
ansible.builtin.include_tasks: install.yml
tags: install
- name: Add target user as an admin
ansible.builtin.user:
name: "{{ target_user }}"
append: true
groups: "lp"
- name: Allow cups on the firewall
ansible.posix.firewalld:
service: ipp
immediate: true
permanent: true
state: enabled
tags: firewall
- name: Enable cups
ansible.builtin.service:
name: cups
enabled: true
state: restarted