c12s-kubespray/roles/adduser/tasks/main.yml
Alessio Greggi 86d05ac180
fix: remove condition for user creation (#9125)
This condition blocks the creation of the `etcd` user in certain conditions.
Specifically, when you have a `etcd_deployment_type: kubeadm` and `kube_owner: root`.
Being the `root` user already present on the system, this will not be a problem (due to the idempotency of ansible).
2022-08-15 23:55:07 -07:00

16 lines
515 B
YAML

---
- name: User | Create User Group
group:
name: "{{ user.group|default(user.name) }}"
system: "{{ user.system|default(omit) }}"
- name: User | Create User
user:
comment: "{{ user.comment|default(omit) }}"
createhome: "{{ user.createhome|default(omit) }}"
group: "{{ user.group|default(user.name) }}"
home: "{{ user.home|default(omit) }}"
shell: "{{ user.shell|default(omit) }}"
name: "{{ user.name }}"
system: "{{ user.system|default(omit) }}"
when: user.name != "root"