-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.yml
48 lines (41 loc) · 1.62 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
# Install FreeIPA packages (set to False if you're using source build; e.g. `timorunge.freeipa`)
# Type: Bool
freeipa_client_install_pkgs: true
# Configure (aka "install") the FreeIPA client
# Type: Bool
freeipa_client_run_installer: true
# FreeIPA client default server/host/domain/realm options
# Type: Str
freeipa_client_hostname: "{{ ansible_hostname }}"
freeipa_client_fqdn: "{{ ansible_fqdn }}"
freeipa_domain: "{{ (freeipa_server | mandatory).split('.',1)[1] }}"
freeipa_realm: "{{ freeipa_domain | upper }}"
# The base command for the FreeIPA client installation
# Type: Str
freeipa_client_install_base_command: ipa-client-install --unattended
# The default FreeIPA client installation options
# Type: List
freeipa_client_install_options_default:
- "--hostname={{ freeipa_client_fqdn }}"
- "--domain={{ freeipa_domain }}"
- "--realm={{ freeipa_realm }}"
- "--principal={{ freeipa_admin_principal | mandatory }}"
- "--password='{{ freeipa_admin_password | mandatory }}'"
- "--mkhomedir"
# Transform the name of the server and the list of replicas into
# `--server=` options. Note that we remove "this host" from the list
# of replcas before transforming into option strings:
# Type: List
freeipa_client_install_options_servers:
"{{ ( [ freeipa_server | mandatory ] + (freeipa_replicas | d([])))
| reject('match', freeipa_client_fqdn)
| map('regex_replace', '^', '--server=')
| list
}}"
# The complete list of client install options:
# Type: List
freeipa_client_install_options:
"{{ freeipa_client_install_options_default
+ freeipa_client_install_options_servers
}}"