Commit 29820f60 authored by Fabien Combernous's avatar Fabien Combernous

Merge branch '41-remove-vagrant-in-domain-name' into 'master'

Resolve "remove vagrant in domain name"

Closes #41

See merge request !44
parents 39f8b795 0c2a61aa
......@@ -45,12 +45,12 @@ Creating an IPA master, with the WebUI proxied to `https://localhost:8440`.
```puppet
class {'freeipa':
ipa_role => 'master',
domain => 'vagrant.example.lan',
ipa_server_fqdn => 'ipa-server-1.vagrant.example.lan',
domain => 'example.lan',
ipa_server_fqdn => 'ipa-server-1.example.lan',
admin_password => 'vagrant123',
directory_services_password => 'vagrant123',
install_ipa_server => true,
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
enable_ip_address => true,
enable_hostname => true,
manage_host_entry => true,
......@@ -65,16 +65,16 @@ Adding a replica:
```puppet
class {'::freeipa':
ipa_role => 'replica',
domain => 'vagrant.example.lan',
ipa_server_fqdn => 'ipa-server-2.vagrant.example.lan',
domain => 'example.lan',
ipa_server_fqdn => 'ipa-server-2.example.lan',
domain_join_password => 'vagrant123',
install_ipa_server => true,
ip_address => '192.168.44.36',
ip_address => '10.10.10.36',
enable_ip_address => true,
enable_hostname => true,
manage_host_entry => true,
install_epel => true,
ipa_master_fqdn => 'ipa-server-1.vagrant.example.lan',
ipa_master_fqdn => 'ipa-server-1.example.lan',
}
```
......@@ -82,10 +82,10 @@ Adding a client:
```puppet
class {'::freeipa':
ipa_role => 'client',
domain => 'vagrant.example.lan',
domain => 'example.lan',
domain_join_password => 'vagrant123',
install_epel => true,
ipa_master_fqdn => 'ipa-server-1.vagrant.example.lan',
ipa_master_fqdn => 'ipa-server-1.example.lan',
}
```
......
......@@ -7,12 +7,12 @@ describe 'freeipa class' do
pp = <<-EOS
class { 'freeipa':
ipa_role => 'master',
domain => 'vagrant.example.lan',
ipa_server_fqdn => 'ipa-server-1.vagrant.example.lan',
domain => 'example.lan',
ipa_server_fqdn => 'ipa-server-1.example.lan',
admin_password => 'vagrant123',
directory_services_password => 'vagrant123',
install_ipa_server => true,
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
enable_ip_address => true,
enable_hostname => true,
manage_host_entry => true,
......@@ -20,7 +20,7 @@ describe 'freeipa class' do
webui_disable_kerberos => true,
webui_enable_proxy => true,
webui_force_https => true,
ipa_master_fqdn => 'ipa-server-1.vagrant.example.lan',
ipa_master_fqdn => 'ipa-server-1.example.lan',
}
EOS
......@@ -40,18 +40,18 @@ describe 'freeipa class' do
pp = <<-EOS
class {'freeipa':
ipa_role => 'replica',
domain => 'vagrant.example.lan',
ipa_server_fqdn => 'ipa-server-2.vagrant.example.lan',
domain => 'example.lan',
ipa_server_fqdn => 'ipa-server-2.example.lan',
admin_password => 'vagrant123',
directory_services_password => 'vagrant123',
password_usedto_joindomain => 'vagrant123',
install_ipa_server => true,
ip_address => '192.168.44.36',
ip_address => '10.10.10.36',
enable_ip_address => true,
enable_hostname => true,
manage_host_entry => true,
install_epel => true,
ipa_master_fqdn => 'ipa-server-1.vagrant.example.lan'
ipa_master_fqdn => 'ipa-server-1.example.lan'
}
EOS
......@@ -72,13 +72,13 @@ describe 'freeipa class' do
pp = <<-EOS
class {'freeipa':
ipa_role => 'client',
domain => 'vagrant.example.lan',
domain => 'example.lan',
admin_password => 'vagrant123',
directory_services_password => 'vagrant123',
password_usedto_joindomain => 'vagrant123',
ip_address => '192.168.44.37',
ip_address => '10.10.10.37',
install_epel => true,
ipa_master_fqdn => 'ipa-server-1.vagrant.example.lan'
ipa_master_fqdn => 'ipa-server-1.example.lan'
}
EOS
......@@ -125,7 +125,7 @@ describe 'freeipa class' do
pp = <<-EOS
exec { 'test ssh':
path => '/bin/',
command => 'ssh -o "StrictHostKeyChecking no" toto@192.168.44.37 id',
command => 'ssh -o "StrictHostKeyChecking no" toto@10.10.10.37 id',
returns => "0"
}
EOS
......
......@@ -12,7 +12,7 @@ HOSTS:
box_check_update: false
vagrant_memsize: 2048
vagrant_cpus: 2
ip: 192.168.44.35
ip: 10.10.10.35
ipa-server-2:
roles:
- replica
......@@ -24,7 +24,7 @@ HOSTS:
box_check_update: false
vagrant_memsize: 2048
vagrant_cpus: 2
ip: 192.168.44.36
ip: 10.10.10.36
ipa-client-centos:
roles:
- client
......@@ -36,7 +36,7 @@ HOSTS:
box_version: 1809.01
box_check_update: false
vagrant_memsize: 1024
ip: 192.168.44.37
ip: 10.10.10.37
ipa-client-ubuntu16:
roles:
- client
......@@ -47,7 +47,7 @@ HOSTS:
box_version: 20181114.0.0
box_check_update: false
vagrant_memsize: 1024
ip: 192.168.44.38
ip: 10.10.10.38
CONFIG:
type: foss
......
......@@ -9,13 +9,13 @@ describe 'freeipa::config::admin_user' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'master',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -9,13 +9,13 @@ describe 'freeipa::config::webui' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'master',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -9,12 +9,12 @@ describe 'freeipa' do
let(:params) do
{
ipa_role: 'client',
ipa_master_fqdn: 'foo.example.com',
domain: 'vagrant.lan',
ipa_master_fqdn: 'foo.example.lan',
domain: 'example.lan',
password_usedto_joindomain: 'foobartest',
admin_password: 'vagrant123',
directory_services_password: 'vagrant123',
ip_address: '192.168.44.35'
ip_address: '10.10.10.35'
}
end
......
require 'spec_helper'
describe 'freeipa', type: :class do
......@@ -17,7 +15,7 @@ describe 'freeipa', type: :class do
domain: 'rspec.example.lan',
admin_password: 'rspecrspec123',
directory_services_password: 'rspecrspec123',
ip_address: '192.168.44.35',
ip_address: '10.10.10.35',
ipa_master_fqdn: 'master.rspec.example.lan'
}
end
......@@ -53,7 +51,7 @@ describe 'freeipa', type: :class do
domain: 'rspec.example.lan',
admin_password: 'rspecrspec123',
directory_services_password: 'rspecrspec123',
ip_address: '192.168.44.36',
ip_address: '10.10.10.36',
ipa_master_fqdn: 'replica.rspec.example.lan',
password_usedto_joindomain: 'rspecrspec123'
}
......@@ -92,7 +90,7 @@ describe 'freeipa', type: :class do
domain: 'rspec.example.lan',
admin_password: 'rspecrspec123',
directory_services_password: 'rspecrspec123',
ip_address: '192.168.44.36',
ip_address: '10.10.10.36',
ipa_master_fqdn: 'client.rspec.example.lan',
password_usedto_joindomain: 'rspecrspec123'
}
......
......@@ -10,13 +10,13 @@ describe 'freeipa::install::autofs' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'master',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -10,13 +10,13 @@ describe 'freeipa::install::client' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'client',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -9,13 +9,13 @@ describe 'freeipa::install::server::master' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'master',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -9,13 +9,13 @@ describe 'freeipa::install::server::replica' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'replica',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -10,13 +10,13 @@ describe 'freeipa::install::server' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'master',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -10,13 +10,13 @@ describe 'freeipa::install::sssd' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'master',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -10,13 +10,13 @@ describe 'freeipa::install' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'master',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
......@@ -7,13 +7,13 @@ describe 'freeipa::helpers::flushcache' do
manifest = <<-EOS
class{ 'freeipa' :
ipa_role => 'master',
ipa_master_fqdn => 'master.example.com',
ipa_server_fqdn => 'foo.example.com',
domain => 'vagrant.lan',
ipa_master_fqdn => 'master.example.lan',
ipa_server_fqdn => 'foo.example.lan',
domain => 'example.lan',
password_usedto_joindomain => 'foobartest',
admin_password => 'foobartest',
directory_services_password => 'foobartest',
ip_address => '192.168.44.35',
ip_address => '10.10.10.35',
}
EOS
manifest
......
require 'beaker-rspec'
require 'beaker-puppet'
require 'beaker/puppet_install_helper'
......@@ -41,55 +39,55 @@ RSpec.configure do |c|
# But here we use several roles dedicated, used only once time in nodeset.
# This permit to use one different IP for each role : master, replica, client-centos7 and client-ubuntu16.
# Here master with ip address 192.168.44.35
# Here master with ip address 10.10.10.35
hosts_as('master').each do |master|
pp = <<-EOS
exec { 'set master /etc/hosts':
path => '/bin/',
command => 'echo -e "127.0.0.1 ipa-server-1.vagrant.example.lan ipa-server-1\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.35 ipa-server-1.vagrant.example.lan ipa-server-1\n" > /etc/hosts',
command => 'echo -e "127.0.0.1 ipa-server-1.example.lan ipa-server-1\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 10.10.10.35 ipa-server-1.example.lan ipa-server-1\n" > /etc/hosts',
}
EOS
apply_manifest_on(master, pp, catch_failures: true, debug: true)
end
# Here replica with ip address 192.168.44.36
# Here replica with ip address 10.10.10.36
hosts_as('replica').each do |replica|
pp = <<-EOS
exec { 'set replica /etc/hosts':
path => '/bin/',
command => 'echo -e "127.0.0.1 ipa-server-2.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.36 ipa-server-2.vagrant.example.lan ipa-server-2\n" > /etc/hosts',
command => 'echo -e "127.0.0.1 ipa-server-2.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 10.10.10.36 ipa-server-2.example.lan ipa-server-2\n" > /etc/hosts',
}
class { 'resolv_conf':
nameservers => ['192.168.44.35'],
nameservers => ['10.10.10.35'],
}
host {'ipa-server-1.vagrant.example.lan':
host {'ipa-server-1.example.lan':
ensure => present,
ip => '192.168.44.35',
ip => '10.10.10.35',
}
EOS
apply_manifest_on(replica, pp, catch_failures: true, debug: true)
end
# Here a first client running CentOS7 with ip address 192.168.44.37
# Here a first client running CentOS7 with ip address 10.10.10.37
hosts_as('client-centos7').each do |clientcentos7|
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',
command => 'echo -e "127.0.0.1 ipa-client-centos.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 10.10.10.37 ipa-client-centos.example.lan ipa-client-centos\n" > /etc/hosts',
}
EOS
apply_manifest_on(clientcentos7, pp, catch_failures: true)
end
# Here a second client running Ubuntu1604 with ip address 192.168.44.38
# Here a second client running Ubuntu1604 with ip address 10.10.10.38
hosts_as('client-ubuntu16').each do |clientubuntu16|
pp = <<-EOS
exec { 'set client ubuntu /etc/hosts':
path => '/bin/',
command => 'echo -e "127.0.0.1 ipa-client-ubuntu16.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.38 ipa-client-ubuntu16.vagrant.example.lan ipa-client-ubuntu16\n" > /etc/hosts',
command => 'echo -e "127.0.0.1 ipa-client-ubuntu16.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 10.10.10.38 ipa-client-ubuntu16.example.lan ipa-client-ubuntu16\n" > /etc/hosts',
}
EOS
......@@ -104,11 +102,11 @@ RSpec.configure do |c|
hosts_as('client').each do |client|
pp = <<-EOS
class { 'resolv_conf':
nameservers => ['192.168.44.35'],
nameservers => ['10.10.10.35'],
}
host {'ipa-server-1.vagrant.example.lan':
host {'ipa-server-1.example.lan':
ensure => present,
ip => '192.168.44.35',
ip => '10.10.10.35',
}
EOS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment