Merge branch 'dev' of evolix/EvoBSD into master
1.1 released then!
This commit is contained in:
commit
abbb5b24f7
|
@ -1,26 +1,7 @@
|
|||
---
|
||||
- name: Create admins accounts
|
||||
user:
|
||||
state: present
|
||||
name: '{{ item.value.name }}'
|
||||
uid: '{{ item.value.uid }}'
|
||||
password: '{{ item.value.password_hash_openbsd }}'
|
||||
groups: wheel
|
||||
shell: /bin/ksh
|
||||
append: yes
|
||||
with_dict:
|
||||
"{{ evolix_users }}"
|
||||
tags:
|
||||
- admin
|
||||
|
||||
- name: Add admins ssh keys
|
||||
lineinfile:
|
||||
state: present
|
||||
dest: '/home/{{ item.value.name }}/.ssh/authorized_keys'
|
||||
line: '{{ item.value.ssh_keys }}'
|
||||
create: yes
|
||||
with_dict:
|
||||
"{{ evolix_users }}"
|
||||
tags:
|
||||
- admin
|
||||
|
||||
- name: Create user accounts
|
||||
include: user.yml
|
||||
vars:
|
||||
user: "{{ item.value }}"
|
||||
with_dict: "{{ evolinux_users }}"
|
||||
when: evolinux_users != {}
|
24
roles/accounts/tasks/user.yml
Normal file
24
roles/accounts/tasks/user.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
- name: "User '{{ user.name }}' is present"
|
||||
user:
|
||||
state: present
|
||||
name: '{{ user.name }}'
|
||||
uid: '{{ user.uid }}'
|
||||
password: '{{ user.password_hash_openbsd }}'
|
||||
groups: wheel
|
||||
shell: /bin/ksh
|
||||
append: yes
|
||||
tags:
|
||||
- admin
|
||||
|
||||
- name: "SSH public keys for '{{ user.name }}' are present"
|
||||
authorized_key:
|
||||
user: "{{ user.name }}"
|
||||
key: "{{ ssk_key }}"
|
||||
state: present
|
||||
with_items: "{{ user.ssh_keys }}"
|
||||
loop_control:
|
||||
loop_var: ssk_key
|
||||
when: user.ssh_keys is defined
|
||||
tags:
|
||||
- admin
|
|
@ -15,6 +15,6 @@
|
|||
path: /etc/daily.local
|
||||
line: '#sh /usr/share/scripts/zzz_evobackup'
|
||||
owner: root
|
||||
mode: "0700"
|
||||
mode: "0644"
|
||||
tags:
|
||||
- evobackup
|
||||
|
|
Loading…
Reference in a new issue