neues logo drucker fixed

This commit is contained in:
2026-01-26 14:14:07 +01:00
parent 4471d845d3
commit 96f523b4df
5 changed files with 122 additions and 4 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
[rdp_clients]
thin-client-01 ansible_host=192.168.178.241
#thin-client-01 ansible_host=192.168.178.241
#thin-client-02 ansible_host=192.168.0.29
#thin-client-03 ansible_host=192.168.0.23
#thin-client-04 ansible host=192.168.0.
#thin-client-04 ansible_host=192.168.0.32
thin-client-05 ansible_host=192.168.0.37
[rdp_clients:vars]
ansible_user=root
#ansible_ssh_private_key_file=~/.ssh/id_rsa
+49 -2
View File
@@ -105,7 +105,7 @@
name: "{{ thin_client_user }}"
password: "{{ thin_client_password }}"
shell: /bin/bash
groups: audio,video,bluetooth,plugdev,netdev,sudo
groups: audio,video,bluetooth,plugdev,netdev,sudo,lpadmin
append: yes
- name: Allow rdpuser to use sudo for package installation
@@ -564,6 +564,54 @@
autoremove: yes
ignore_errors: yes
# === PRINTER SUPPORT (CUPS) ===
- name: Enable and start CUPS service
systemd:
name: cups
enabled: yes
state: started
ignore_errors: yes
- name: Create PolicyKit rules directory
file:
path: /etc/polkit-1/rules.d
state: directory
mode: '0755'
- name: Create PolicyKit rule for CUPS (lpadmin group)
copy:
dest: /etc/polkit-1/rules.d/49-allow-lpadmin.rules
mode: '0644'
content: |
// Allow lpadmin group to manage printers without authentication
polkit.addRule(function(action, subject) {
if ((action.id == "org.opensuse.cupspkhelper.mechanism.all-edit" ||
action.id.indexOf("org.opensuse.cupspkhelper.mechanism.") == 0) &&
subject.isInGroup("lpadmin")) {
return polkit.Result.YES;
}
});
- name: Create directory for legacy PolicyKit configuration
file:
path: /etc/polkit-1/localauthority/50-local.d
state: directory
mode: '0755'
ignore_errors: yes
- name: Create legacy PolicyKit configuration for CUPS
copy:
dest: /etc/polkit-1/localauthority/50-local.d/49-allow-lpadmin-cups.pkla
mode: '0644'
content: |
[Allow lpadmin group to manage printers]
Identity=unix-group:lpadmin
Action=org.opensuse.cupspkhelper.mechanism.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ignore_errors: yes
- name: Disable unnecessary services
systemd:
name: "{{ item }}"
@@ -571,7 +619,6 @@
state: stopped
loop:
- ModemManager
- cups
ignore_errors: yes
- name: Final message