From 66934f65a4f057f49ab7c793f0ec78530c0c237e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 3 Jul 2016 14:45:15 -0300 Subject: Adds puppet manifests --- manifests/image.pp | 9 +++++++++ manifests/init.pp | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 manifests/image.pp create mode 100644 manifests/init.pp (limited to 'manifests') diff --git a/manifests/image.pp b/manifests/image.pp new file mode 100644 index 0000000..dd093c6 --- /dev/null +++ b/manifests/image.pp @@ -0,0 +1,9 @@ +define bootless::image( + $path, +) { + exec { "bootless-image-${name}": + command => "/usr/local/bin/bootless image ${::bootless::folder} ${path}" + owner => ${::bootless::owner}, + require => Exec['bootless-init'], + } +} diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..938b209 --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,21 @@ +class bootless ( + $folder = false, + $repository = '', + $owner = 'root', +){ + file { '/usr/local/bin/bootless': + ensure => present, + owner => root, + group => root, + mode => 0755, + source => 'puppet://modules/bootless/bootless', + } + + if $folder != false { + exec { "bootless-init": + command => "/usr/local/bin/bootless init ${folder} ${repository}", + user => $owner, + creates => $folder, + } + } +} -- cgit v1.2.3