53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
|
---
|
|||
|
|
|||
|
- name: Install epoptes server
|
|||
|
apt:
|
|||
|
name: [ 'epoptes' ]
|
|||
|
state: present
|
|||
|
|
|||
|
- name: Copy epoptes certificate key
|
|||
|
copy:
|
|||
|
src: "/var/lib/nethserver/secrets/epoptes/{{ epoptesgroup }}/server.key"
|
|||
|
dest: "/etc/epoptes/server.key"
|
|||
|
owner: root
|
|||
|
group: root
|
|||
|
mode: 0600
|
|||
|
notify: restart epoptes
|
|||
|
|
|||
|
# TODO: all users and all groups
|
|||
|
|
|||
|
- name: Make sure the admin users are part of the epoptes group ({{ epoptesgroup }})
|
|||
|
user:
|
|||
|
name: "{{ user }}"
|
|||
|
groups: epoptes
|
|||
|
append: yes
|
|||
|
state: present
|
|||
|
loop: "{{ epoptesadminusers }}"
|
|||
|
loop_control:
|
|||
|
loop_var: user
|
|||
|
|
|||
|
# TODO: at the moment, this is unsupported.
|
|||
|
# In Active Directory, groups can be part of other groups
|
|||
|
# We can't reproduce that in linux, so we have to:
|
|||
|
# - iterate the epoptesadmingroups list
|
|||
|
# - for each group, fetch the members from nethserver-accounts
|
|||
|
# - add each member
|
|||
|
# We also have to deal with the removal of a user from the aforementioned groups
|
|||
|
|
|||
|
# - name: Make sure the users members of the admin groups are part of the epoptes group
|
|||
|
# user:
|
|||
|
# name: "{{ item.1 }}"
|
|||
|
# groups: epoptes
|
|||
|
# append: yes
|
|||
|
# state: present
|
|||
|
# with_subelements:
|
|||
|
# - "{{ epoptesadmingroups }}"
|
|||
|
# - members
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
- name: Set epoptes server as configured
|
|||
|
set_fact: epoptes_server_configured=true
|