diff options
Diffstat (limited to '')
-rw-r--r-- | manifests/template_final.pp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/manifests/template_final.pp b/manifests/template_final.pp new file mode 100644 index 0000000..a198775 --- /dev/null +++ b/manifests/template_final.pp @@ -0,0 +1,28 @@ +define nspawn::template_final ( + String $root, + String $puppet_server, + String $template = $name, +) { + exec { "Enable puppet on ${template}": + command => [ '/usr/bin/systemd-nspawn', + '-M', $template, + '--quiet', + 'systemctl', 'enable', 'puppet', + ], + creates => "${root}/etc/systemd/system/multi-user.target.wants/puppet.service", + } + + file { [ "${root}/etc/puppetlabs", + "${root}/etc/puppetlabs/puppet" ] : + ensure => directory, + } + + + file { "${root}/etc/puppetlabs/puppet/puppet.conf": + ensure => file, + content => @("EOF") + [main] + server = ${puppet_server} + | EOF + } +} |