From 7399845dbb93aa9c6e8c702afb0e8dcbd66d520a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 21 Aug 2019 09:32:52 +0200 Subject: [PATCH] create cups admin user after installation --- tasks/install.yml | 7 +++++++ tasks/main.yml | 1 - tasks/prepare.yml | 10 ---------- 3 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 tasks/prepare.yml diff --git a/tasks/install.yml b/tasks/install.yml index 0f7d2ee..1c7c464 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -22,6 +22,13 @@ - etc/cups/cups-files.conf notify: __cupsd_restart + - name: Create user '{{ cups_admin_username }}' + user: + comment: Cups Admin + name: "{{ cups_admin_username }}" + password: "{{ cups_admin_password | password_hash('sha512', inventory_hostname) }}" + groups: printadmin + - name: Update pamd rule's control in /etc/pam.d/cups pamd: name: cups diff --git a/tasks/main.yml b/tasks/main.yml index 2f0990f..2a009c0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,4 @@ --- -- include_tasks: prepare.yml - include_tasks: install.yml - include_tasks: selinux.yml when: ansible_selinux.status == "enabled" diff --git a/tasks/prepare.yml b/tasks/prepare.yml deleted file mode 100644 index 2d3be32..0000000 --- a/tasks/prepare.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- block: - - name: Create user '{{ cups_admin_username }}' - user: - comment: Cups Admin - name: "{{ cups_admin_username }}" - password: "{{ cups_admin_password | password_hash('sha512', inventory_hostname) }}" - groups: printadmin - become: True - become_user: root