Forge Home


A module to push files


9,112 latest version

1.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.5 (latest)
  • 0.0.4 (deleted)
  • 0.0.3 (deleted)
  • 0.0.2 (deleted)
  • 0.0.1 (deleted)
released Mar 18th 2015
This version is compatible with:
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'dominickaiser-filepush', '0.0.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add dominickaiser-filepush
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install dominickaiser-filepush --version 0.0.5

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



dominickaiser/filepush — version 0.0.5 Mar 18th 2015

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.


GPL use it how ever you would like and to your heart's content.


Demi Benson, Dominic Kaiser


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.


  • 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.


Please email Thank You!