aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga_common/manifests/local_script.pp
blob: 3272786b4c23c14df7c33ab467091b9176112549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
define mga_common::local_script(
                $content = undef,
                $source = undef,
                $owner = 'root',
                $group = 'root',
                $mode = '0755') {
    $filename = "/usr/local/bin/${name}"
    file { $filename:
        owner   => $owner,
        group   => $group,
        mode    => $mode,
    }
    if ($source == undef) {
        File[$filename] {
            content => $content,
        }
    } else {
        File[$filename] {
            source => $source,
        }
    }
}