mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-22 03:17:43 -02:30
turn adduser/download roles into meta roles
This should make things a little more composable, by making these roles meta roles that perform no actions by default we allow each role to own its own resources.
This commit is contained in:
@@ -1,28 +1,13 @@
|
||||
---
|
||||
- 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
|
||||
|
||||
- name: User | Create User Group
|
||||
group: name={{item.group|default(item.name)}} system={{item.system|default(omit)}}
|
||||
with_items: "{{ addusers }}"
|
||||
group: name={{user.group|default(user.name)}} system={{user.system|default(omit)}}
|
||||
|
||||
- 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)}}"
|
||||
with_items: "{{ addusers }}"
|
||||
comment: "{{user.comment|default(omit)}}"
|
||||
createhome: "{{user.create_home|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)}}"
|
||||
|
||||
Reference in New Issue
Block a user