aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga_common/manifests/local_script.pp
blob: 70aad7b07bc27dea62a46c35b887601bdb40229c (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,
	}
    }
}