chore(user): fix lints in role

This commit is contained in:
Jan Christian Grünhage 2023-02-21 12:38:35 +01:00
parent 6216dd313d
commit 80089460cd
No known key found for this signature in database
GPG key ID: EEC1170CE56FA2ED
6 changed files with 18 additions and 30 deletions

View file

@ -1,3 +1,3 @@
---
users_sudo_namespace: ansible-managed
users_sudo_namespace: "ansible-managed"
users: []

View file

@ -1,2 +0,0 @@
---
# handlers file for user

View file

@ -1,19 +1,11 @@
---
galaxy_info:
author: Jan Christian Grünhage <jan.christian@gruenhage.xyz>
description: Basic user setup
author: "Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
description: "Basic user setup"
min_ansible_version: "2.13"
galaxy_tags: []
platforms:
- name: Debian
versions:
- stretch
- buster
- bullseye
license: AGPL-3.0-or-later
- name: "Debian"
versions: ["stretch", "buster", "bullseye"]
license: "AGPL-3.0-or-later"
dependencies: []

View file

@ -1,24 +1,24 @@
---
- name: Ensure sudo is installed
- name: "Ensure sudo is installed"
package:
name: sudo
state: present
register: task_result
until: task_result is success
name: "sudo"
state: "present"
register: "task_result"
until: "task_result is success"
retries: 3
delay: 2
- name: Loop over users and include per-user tasks
include_tasks: user.yml
- name: "Loop over users and include per-user tasks"
include_tasks: "user.yml"
loop: "{{ users | dict2items(key_name='name', value_name='attrs') }}"
loop_control:
loop_var: user
loop_var: "user"
- name: Template sudoers.d managed file
- name: "Template sudoers.d managed file"
template:
src: "sudoers.j2"
dest: "/etc/sudoers.d/{{ users_sudo_namespace }}"
owner: root
mode: 0440
owner: "root"
mode: "0440"
validate: "/usr/sbin/visudo -cf %s"
become: true

View file

@ -18,4 +18,4 @@
key: "{{ user.attrs.ssh | join('\n') }}"
exclusive: true
become: true
when: user.attrs.active | default(false)
when: "user.attrs.active | default(false)"

View file

@ -1,2 +0,0 @@
---
# vars file for user