system/tasks/usergroup.yml

17 lines
351 B
YAML
Raw Normal View History

2021-02-24 21:40:34 +00:00
---
- name: create system user
become: yes
user:
name: "{{item.name}}"
system: yes
home: "{{ item.home | default('/') }}"
shell: "{{ item.shell |default('/usr/bin/nologin') }}"
with_items: "{{system_user}}"
- name: create system group
group:
name: "{{item.name}}"
with_items: "{{system_group}}"
become: yes