Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Scott Barthelemy
puppet-freeipa
Commits
89757dd8
Commit
89757dd8
authored
Sep 28, 2018
by
Scott Barthelemy
Committed by
Fabien Combernous
Sep 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Install Client Centos7"
parent
9e12922a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
3 deletions
+65
-3
manifests/install/client.pp
manifests/install/client.pp
+1
-2
spec/acceptance/freeipa_spec.rb
spec/acceptance/freeipa_spec.rb
+23
-1
spec/acceptance/nodesets/default.yml
spec/acceptance/nodesets/default.yml
+8
-0
spec/spec_helper_acceptance.rb
spec/spec_helper_acceptance.rb
+33
-0
No files found.
manifests/install/client.pp
View file @
89757dd8
...
...
@@ -39,8 +39,7 @@ class freeipa::install::client {
$client_install_cmd_opts_no_ntp
=
'--no-ntp'
}
$client_install_cmd
=
"
\
/usr/sbin/ipa-client-install
\
$client_install_cmd
=
"/usr/sbin/ipa-client-install
\
--server=
${freeipa::ipa_master_fqdn}
\
--realm=
${freeipa::final_realm}
\
--domain=
${freeipa::domain}
\
...
...
spec/acceptance/freeipa_spec.rb
View file @
89757dd8
...
...
@@ -37,7 +37,7 @@ describe 'freeipa class' do
end
end
end
### Test Install Replica
context
'replica'
do
context
'with default parameters'
do
...
...
@@ -69,5 +69,27 @@ describe 'freeipa class' do
end
end
end
### Test Install Client
context
'when clients'
do
context
'with default parameters'
do
hosts_as
(
'client'
).
each
do
|
client
|
it
'applies idempotently'
do
pp
=
<<-
EOS
class {'freeipa':
ipa_role => 'client',
domain => 'vagrant.example.lan',
domain_join_password => 'vagrant123',
install_epel => true,
ipa_master_fqdn => 'ipa-server-1.vagrant.example.lan',
}
EOS
apply_manifest_on
(
client
,
pp
,
catch_failures:
true
,
debug:
true
)
apply_manifest_on
(
client
,
pp
,
catch_changes:
true
,
debug:
true
)
end
end
end
end
end
end
spec/acceptance/nodesets/default.yml
View file @
89757dd8
...
...
@@ -24,6 +24,14 @@ HOSTS:
box
:
geerlingguy/centos7
vagrant_memsize
:
2048
ip
:
192.168.44.36
ipa-client-centos
:
roles
:
-
client
-
centos7
platform
:
el-7-x86_64
hypervisor
:
vagrant
box
:
geerlingguy/centos7
ip
:
192.168.44.37
CONFIG
:
type
:
foss
...
...
spec/spec_helper_acceptance.rb
View file @
89757dd8
...
...
@@ -71,5 +71,38 @@ RSpec.configure do |c|
apply_manifest_on
(
replica
,
pp
,
:catch_failures
=>
true
,
:debug
=>
true
)
end
## Preconfigure client
hosts_as
(
'centos7'
).
each
do
|
centos7
|
pp
=
<<-
EOS
exec { 'set client centos /etc/hosts':
path => '/bin/',
command => 'echo -e "127.0.0.1 ipa-client-centos.vagrant.example.lan ipa-server-2
\n
::1 ip6-localhost ip6-loopback
\n
fe00::0 ip6-localnet
\n
ff00::0 ip6-mcastprefix
\n
ff02::1 ip6-allnodes
\n
ff02::2 ip6-allrouters
\n\n
192.168.44.37 ipa-client-centos.vagrant.example.lan ipa-client-centos
\n
" > /etc/hosts',
}
EOS
apply_manifest_on
(
centos7
,
pp
,
catch_failures:
true
)
end
hosts_as
(
'client'
).
each
do
|
client
|
pp
=
<<-
EOS
class { 'resolv_conf':
nameservers => ['192.168.44.35'],
}
EOS
apply_manifest_on
(
client
,
pp
,
catch_failures:
true
)
puppet
(
'module'
,
'install'
,
'saz-resolv_conf'
)
pp
=
<<-
EOS
host {'ipa-server-1.vagrant.example.lan':
ensure => present,
ip => '192.168.44.35',
}
EOS
apply_manifest_on
(
client
,
pp
,
catch_failures:
true
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment