-
Notifications
You must be signed in to change notification settings - Fork 0
/
sss.pp
61 lines (51 loc) · 1.48 KB
/
sss.pp
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
49
50
51
52
53
54
55
56
57
58
59
60
61
class sss {
$domain = '1.5.ff.es.eu.org'
$realm = '1.5.FF.ES.EU.ORG'
$server = 'ipa1.1.5.ff.es.eu.org'
$hostname = $facts['networking']['hostname']
$ipa_master_ip = 'ip_master_ip_address'
$ntp_server_1_ip = 'ntp1_ip_address'
$ntp_server_2_ip = 'ntp2_ip_address'
$password = 'Welcome1.'
$ip_address = $facts['networking']['ip6']
file { '/etc/hostname':
ensure => present,
content => "${hostname}.${domain}\n",
}
host { $hostname:
ensure => present,
name => "${hostname}.${domain}",
host_aliases => [$hostname],
ip => "${ip_address}",
}
host { 'ipa1':
ensure => present,
name => "ipa1.1.5.ff.es.eu.org",
host_aliases => "ipa1",
ip => "2001:470:736b:511::2",
}
host { 'ipa2':
ensure => present,
name => "ipa2.1.5.ff.es.eu.org",
host_aliases => "ipa2",
ip => "2001:470:736b:511::3",
}
file { '/etc/hosts':
ensure => present,
require => Host[$hostname, 'ipa1', 'ipa2'],
}
package { 'freeipa-client':
ensure => installed,
}
service { 'sssd':
ensure => running,
enable => true,
require => Package['freeipa-client'],
}
exec { 'join_freeipa_domain':
command => "sudo ipa-client-install --server=$server --domain=$domain --ip-address=$ip_address --realm=$realm --ntp-server=$ntp_server_1_ip --ntp-server=$ntp_server_2_ip --password=$password [email protected] --unattended",
path => "/usr/bin",
require => Package['freeipa-client'],
}
}
class { 'sss': }