From ef3346523df4ff47a61b87750ec6b8485e558fd8 Mon Sep 17 00:00:00 2001 From: Simeon Keske Date: Wed, 18 Mar 2020 17:03:21 +0100 Subject: [PATCH] make linter happy(er) --- tasks/main.yml | 2 +- tasks/user.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index b220ce7..e69aaa6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -13,4 +13,4 @@ owner: root group: root mode: 0644 - when: motd_path is not undefined and motd_path != '' + when: motd_path is defined diff --git a/tasks/user.yml b/tasks/user.yml index 3a483a8..1cc6d4c 100644 --- a/tasks/user.yml +++ b/tasks/user.yml @@ -8,7 +8,7 @@ - "{{ users }}" - name: get bash's path - shell: command -v bash + command: command -v bash register: bash_path changed_when: false @@ -26,35 +26,35 @@ state=present exclusive=yes with_items: - "{{ users }}" - when: item.state != 'absent' and item.public_key is defined and item.public_key != '' + when: item.state != 'absent' and item.public_key is defined - name: add user to root's authorized_keys authorized_key: user="root" manage_dir=true key="{{ item.public_key }}" state=present with_items: - "{{ users }}" - when: item.state != 'absent' and item.public_key is defined and item.public_key != '' + when: item.state != 'absent' and item.public_key is defined - name: remove user from root's authorized_keys authorized_key: user="root" manage_dir=true key="{{ item.public_key }}" state=absent with_items: - "{{ users }}" - when: item.state == 'absent' and item.public_key is defined and item.public_key != '' + when: item.state == 'absent' and item.public_key is defined - name: create pve admin-group - shell: + command: cmd: 'pveum groupadd admin -comment "System Administrators"' when: "'proxmox' in group_names" ignore_errors: True - name: give pve admin-group privileges - shell: + command: cmd: 'pveum aclmod / -group admin -role Administrator' when: "'proxmox' in group_names" - name: create pve user - shell: + command: cmd: 'pveum useradd {{ item.name }}@pam' with_items: - "{{ users }}" @@ -62,7 +62,7 @@ ignore_errors: True - name: disable pve user - shell: + command: cmd: 'pveum usermod {{ item.name }}@pam -enable 0' with_items: - "{{ users }}" @@ -70,7 +70,7 @@ ignore_errors: True - name: add user to pve admin group - shell: + command: cmd: 'pveum usermod {{ item.name }}@pam -group admin' with_items: - "{{ users }}"