-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnfsk.pp
44 lines (36 loc) · 929 Bytes
/
nfsk.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
class nfsk {
$domain = '1.5.ff.es.eu.org'
$hostname = $facts['networking']['hostname']
$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'],
}
exec { 'ipa_client_automount':
command => "echo 'y' | sudo ipa-client-automount --location=default",
path => "/usr/bin",
}
}
class { 'nfsk': }