2016-02-19 17:48:53 +00:00
|
|
|
---
|
|
|
|
- name: gather os specific variables
|
|
|
|
include_vars: "{{ item }}"
|
|
|
|
with_first_found:
|
|
|
|
- files:
|
|
|
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
|
|
|
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
|
|
|
|
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
|
|
|
|
- "{{ ansible_distribution|lower }}.yml"
|
|
|
|
- "{{ ansible_os_family|lower }}.yml"
|
|
|
|
- defaults.yml
|
|
|
|
paths:
|
|
|
|
- ../vars
|
|
|
|
skip: true
|
|
|
|
|
2016-01-23 17:01:18 +00:00
|
|
|
- name: User | Create User Group
|
|
|
|
group: name={{item.group|default(item.name)}} system={{item.system|default(omit)}}
|
2016-03-30 08:23:43 +00:00
|
|
|
with_items: "{{ addusers }}"
|
2016-01-23 17:01:18 +00:00
|
|
|
|
|
|
|
- name: User | Create User
|
|
|
|
user:
|
|
|
|
comment: "{{item.comment|default(omit)}}"
|
|
|
|
createhome: "{{item.create_home|default(omit)}}"
|
|
|
|
group: "{{item.group|default(item.name)}}"
|
|
|
|
home: "{{item.home|default(omit)}}"
|
|
|
|
name: "{{item.name}}"
|
|
|
|
system: "{{item.system|default(omit)}}"
|
2016-03-30 08:23:43 +00:00
|
|
|
with_items: "{{ addusers }}"
|