41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
|
---
|
||
|
|
||
|
# TODO: check if the host is master/member for another epoptes group
|
||
|
# the host should be master/member of a single epoptes group
|
||
|
|
||
|
- include: certificates.yml
|
||
|
epoptesgroup="{{ item.key }}"
|
||
|
loop: "{{ esmith_hosts | dict2items }}"
|
||
|
when:
|
||
|
- item.value.GroupPurpose is defined
|
||
|
- item.value.GroupPurpose=="epoptes"
|
||
|
|
||
|
# epoptes server is installed only on epoptes master
|
||
|
- include: epoptes-server.yml
|
||
|
epoptesgroup="{{ item.key }}"
|
||
|
epoptesadmingroups="{{ item.value.AdminGroups.split(' ')}}"
|
||
|
epoptesadminusers="{{ item.value.AdminUsers.split(' ') }}"
|
||
|
loop: "{{ esmith_hosts | dict2items }}"
|
||
|
when:
|
||
|
- epoptes_server_configured is not defined
|
||
|
- item.value.master is defined
|
||
|
- item.value.master==ansible_hostname
|
||
|
- item.value.GroupPurpose is defined
|
||
|
- item.value.GroupPurpose=="epoptes"
|
||
|
|
||
|
# epoptes client is installed on all epoptes hosts
|
||
|
- include: epoptes-client.yml
|
||
|
epoptesgroup="{{ item.key }}"
|
||
|
epoptesserver="{{ item.value.master }}.{{ ansible_domain }}"
|
||
|
loop: "{{ esmith_hosts | dict2items }}"
|
||
|
when:
|
||
|
- epoptes_client_configured is not defined
|
||
|
- item.value.GroupPurpose is defined
|
||
|
- item.value.GroupPurpose=="epoptes"
|
||
|
|
||
|
|
||
|
- name: Import nethserver accounts
|
||
|
nethserver-accounts:
|
||
|
register: nethserver_accounts
|
||
|
delegate_to: localhost
|