feat(server/cups): implement CUPS role
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
d5137bc5fb
commit
34798fd196
2 changed files with 31 additions and 0 deletions
7
roles/server/cups/tasks/install.yml
Normal file
7
roles/server/cups/tasks/install.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
- name: Install the cups and deps
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- cups
|
||||
- hplip
|
||||
state: present
|
24
roles/server/cups/tasks/main.yml
Normal file
24
roles/server/cups/tasks/main.yml
Normal 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
|
Loading…
Reference in a new issue