Files
gitea-pages/admin-guide/puppet/profiles/filecopy.rst
2021-05-05 14:24:27 +02:00

1.1 KiB

profile::filecopy

This module allows to copy file on the host using a git repository as the source.

The purpose of this module is to distribute files that are not created/configured with other modules, usually files very specific eg. scripts for very specific environments.

With this module is possible to specifiy only single files, so no directory or recursion is possible.

The source files are taken from the master branch of a git repo that should be accessible without authentication. Or anyway accessible from the host where the files have to be copied (eg. via a proper ssh key).

A section like the following in hiera will copy on file /tmp/test1 the content of https://git.psi.ch/talamo_i/copy-file-test/raw/master/abc:

filecopy::files:
  '/tmp/test1':
     repo: 'talamo_i/copy-file-test'
     path: 'abc'
     mode: '0600'
     owner: 'talamo_i'
You can additionally specify the group owner of the file:

group: 'apache'

This module is included by default and filecopy::files is empty by default.

To copy files just define properly the filecopy::files variable.