Add users role

This commit is contained in:
Ryan Cavicchioni 2019-10-27 18:34:27 -05:00
parent 497c70a3bf
commit cfdbeb0f2d
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,2 @@
---
user_default_shell: /bin/bash

View File

@ -18,11 +18,12 @@
groups: "{{ item.groups | default(omit) }}" groups: "{{ item.groups | default(omit) }}"
home: "{{ item.home | default(omit) }}" home: "{{ item.home | default(omit) }}"
password: "{{ item.password | default(omit) }}" password: "{{ item.password | default(omit) }}"
shell: "{{ item.shell | default(omit) }}" shell: "{{ item.shell | default(user_default_shell) }}"
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
system: false system: false
with_items: "{{ users_interactive }}" with_items: "{{ users_interactive }}"
when: users_interactive is defined when: users_interactive is defined
no_log: yes
- name: ensure system groups - name: ensure system groups
group: group:
@ -48,6 +49,7 @@
system: true system: true
with_items: "{{ users_system }}" with_items: "{{ users_system }}"
when: users_system is defined when: users_system is defined
no_log: yes
- name: ensure authorized keys - name: ensure authorized keys
authorized_key: authorized_key: