Version information
This version is compatible with:
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'dominickaiser-filepush', '0.0.5'
Learn more about managing modules with a PuppetfileDocumentation
This is the filepush module.
This module was created simply to push files. It is fully parameterized to use with Foreman 1.1 and later. I wanted to be able to fill in parameters on the web interface.
License
GPL use it how ever you would like and to your heart's content.
Authors
Demi Benson dbenson.puppet@gmail.com, Dominic Kaiser dominic@theriversouth.org
Code
class ct-filepush (
$source = undef,
$target = undef,
$owner = undef,
$group = $owner,
$mode = 0644,
) {
case $::osfamily {
'Windows': { fail('Does not yet work wint Windows') }
default: {
$path_sep = '/'
$filepath_ar = split($target, $path_sep)
$parent_path = join(delete_at($filepath_ar, -1), $path_sep)
exec { 'make_parent_dirs':
path => [ '/usr/bin', '/usr/sbin', '/bin'],
command => "mkdir -p ${parent_path}",
unless => "test -d ${parent_path}"
}
}
}
file { $target:
ensure => directory,
path => $target,
mode => $mode,
owner => $owner,
group => $group,
source => $source,
}
}
This is so I can push a file to a directory and if parent directories do not exist create them. This gives you a blank template to just pop values in and apply.
TODO
- Need to make it compatible with windows. If anyone knows how to mkdir -p in windows let me know and I will finish adding this.
Support
Please email dominic@theriversouth.org Thank You!
2015-03-18 - Dominic Kaiser dominic@theriversouth.org - 0.0.5
- no code changes just updated metadata.json for new format
2013-04-12 - Dominic Kaiser dominic@theriversouth.org - 0.0.4
- no code changes just readme and contact
- added Demi's email for contact
- changed example to code
2013-03-11 - Dominic Kaiser dominic@theriversouth.org - 0.0.3
- updated README
- added CHANGELOG
Dependencies
- puppetlabs/stdlib (>=3.0.0)