system/tasks/usergroup.yml

16 lines
384 B
YAML
Raw Normal View History

2021-02-24 21:40:34 +00:00
---
2022-12-10 17:51:03 +00:00
- name: Create system user
2022-02-13 08:40:15 +00:00
become: true
2022-12-10 17:51:03 +00:00
ansible.builtin.user:
name: '{{ item.name }}'
2022-02-13 08:40:15 +00:00
system: true
home: "{{ item.home | default('/') }}"
2022-12-10 17:51:03 +00:00
shell: "{{ item.shell | default('/usr/bin/nologin') }}"
with_items: '{{ system_user }}'
2021-02-24 21:40:34 +00:00
2022-12-10 17:51:03 +00:00
- name: Create system group
ansible.builtin.group:
name: '{{ item.name }}'
with_items: '{{ system_group }}'
2022-02-13 08:40:15 +00:00
become: true