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
|
- name: Create user accounts
|
||||||
user:
|
include: user.yml
|
||||||
state: present
|
vars:
|
||||||
name: '{{ item.value.name }}'
|
user: "{{ item.value }}"
|
||||||
uid: '{{ item.value.uid }}'
|
with_dict: "{{ evolinux_users }}"
|
||||||
password: '{{ item.value.password_hash_openbsd }}'
|
when: evolinux_users != {}
|
||||||
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
|
|
||||||
|
|
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
|
path: /etc/daily.local
|
||||||
line: '#sh /usr/share/scripts/zzz_evobackup'
|
line: '#sh /usr/share/scripts/zzz_evobackup'
|
||||||
owner: root
|
owner: root
|
||||||
mode: "0700"
|
mode: "0644"
|
||||||
tags:
|
tags:
|
||||||
- evobackup
|
- evobackup
|
||||||
|
|
Loading…
Reference in a new issue