make linter happy(er)

main
Simeon Keske 4 years ago
parent 611d5d5339
commit ef3346523d
No known key found for this signature in database
GPG Key ID: B15B623C3C45B235

@ -13,4 +13,4 @@
owner: root
group: root
mode: 0644
when: motd_path is not undefined and motd_path != ''
when: motd_path is defined

@ -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 }}"

Loading…
Cancel
Save