blob: 4e213fee128b685d0aa2c44f1842bf61340a7c5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
- name: Ensure user is existing on the system
user:
name: "{{ user }}"
uid: "{{ spec.uid | default(omit) }}"
group: "{{ spec.group | default(omit) }}"
comment: "{{ spec.name | default(omit) }}"
password: "{{ spec.password | default(omit) }}"
shell: "{{ spec.shell | default('/bin/false') }}"
home: "{{ spec.home | default(omit) }}"
state: present
# Configure ssh keys if specified
- name: Add group
user: name="{{ user }}" groups="{{ new_group }}" append="yes"
|