Revision 295caaf8
Added by Dominic Cleal about 9 years ago
.fixtures.yml | ||
---|---|---|
fixtures:
|
||
repositories:
|
||
concat_native: "git://github.com/theforeman/puppet-concat.git"
|
||
concat: 'https://github.com/puppetlabs/puppetlabs-concat'
|
||
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
|
||
|
||
symlinks:
|
||
dhcp: "#{source_dir}"
|
manifests/host.pp | ||
---|---|---|
|
||
$host = $name
|
||
|
||
concat_fragment { "dhcp.hosts+10_${name}.hosts":
|
||
concat::fragment { "dhcp.hosts+10_${name}.hosts":
|
||
target => "${::dhcp::dhcp_dir}/dhcpd.hosts",
|
||
content => template('dhcp/dhcpd.host.erb'),
|
||
order => "10-${name}",
|
||
}
|
||
}
|
manifests/init.pp | ||
---|---|---|
}
|
||
}
|
||
|
||
concat_build { 'dhcp.conf':
|
||
order => ['*.dhcp'],
|
||
require => Package[$packagename],
|
||
notify => [Service[$servicename],File["${dhcp_dir}/dhcpd.conf"]],
|
||
}
|
||
file { "${dhcp_dir}/dhcpd.conf":
|
||
concat { "${dhcp_dir}/dhcpd.conf":
|
||
owner => 'root',
|
||
group => 'root',
|
||
mode => '0644',
|
||
source => concat_output('dhcp.conf'),
|
||
require => [Package[$packagename],Concat_build['dhcp.conf']],
|
||
require => Package[$packagename],
|
||
notify => Service[$servicename],
|
||
}
|
||
|
||
concat_fragment { 'dhcp.conf+01_main.dhcp':
|
||
concat::fragment { 'dhcp.conf+01_main.dhcp':
|
||
target => "${dhcp_dir}/dhcpd.conf",
|
||
content => template('dhcp/dhcpd.conf.erb'),
|
||
order => '01',
|
||
}
|
||
|
||
concat_build { 'dhcp.hosts':
|
||
order => ['*.hosts'],
|
||
require => Package[$packagename],
|
||
notify => [Service[$servicename],File["${dhcp_dir}/dhcpd.hosts"]],
|
||
}
|
||
file { "${dhcp_dir}/dhcpd.hosts":
|
||
concat { "${dhcp_dir}/dhcpd.hosts":
|
||
owner => 'root',
|
||
group => 'root',
|
||
mode => '0644',
|
||
source => concat_output('dhcp.hosts'),
|
||
require => [Package[$packagename],Concat_build['dhcp.hosts']],
|
||
require => Package[$packagename],
|
||
notify => Service[$servicename],
|
||
}
|
||
|
||
concat_fragment { 'dhcp.hosts+01_main.hosts':
|
||
concat::fragment { 'dhcp.hosts+01_main.hosts':
|
||
target => "${dhcp_dir}/dhcpd.hosts",
|
||
content => "# static DHCP hosts\n",
|
||
order => '01',
|
||
}
|
||
|
||
service { $servicename:
|
||
ensure => running,
|
||
enable => true,
|
||
hasstatus => true,
|
||
subscribe => File["${dhcp_dir}/dhcpd.hosts", "${dhcp_dir}/dhcpd.conf"],
|
||
require => Package[$packagename],
|
||
ensure => running,
|
||
enable => true,
|
||
}
|
||
|
||
}
|
manifests/pool.pp | ||
---|---|---|
$static_routes = undef,
|
||
) {
|
||
|
||
concat_fragment { "dhcp.conf+70_${name}.dhcp":
|
||
concat::fragment { "dhcp.conf+70_${name}.dhcp":
|
||
target => "${::dhcp::dhcp_dir}/dhcpd.conf",
|
||
content => template('dhcp/dhcpd.pool.erb'),
|
||
order => "70-${name}",
|
||
}
|
||
|
||
}
|
metadata.json | ||
---|---|---|
],
|
||
"dependencies": [
|
||
{
|
||
"name": "theforeman/concat_native",
|
||
"version_requirement": ">= 1.3.0 < 2.0.0"
|
||
"name": "puppetlabs/concat",
|
||
"version_requirement": ">= 1.0.0 < 3.0.0"
|
||
}
|
||
],
|
||
"requirements": [
|
Also available in: Unified diff
Use puppetlabs-concat instead of theforeman-concat_native