diff options
author | mh <mh@immerda.ch> | 2016-11-01 20:26:20 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2016-11-01 20:26:20 +0100 |
commit | 720c1670750345e8c361219a58c2722a603e26bb (patch) | |
tree | 0379a2c21c3c2b7f32d9c8f149040f128efa858b /manifests/onionbalance/key.pp | |
parent | 4510682dff23142df5de4cfcc988e4319fcb73cd (diff) |
add support for onionbalance
Diffstat (limited to 'manifests/onionbalance/key.pp')
-rw-r--r-- | manifests/onionbalance/key.pp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/manifests/onionbalance/key.pp b/manifests/onionbalance/key.pp new file mode 100644 index 0000000..e0016fc --- /dev/null +++ b/manifests/onionbalance/key.pp @@ -0,0 +1,25 @@ +# manage onionbalance keys +# +# key_content will be treated as path +# to a file containing the key content +# if the value starts with a / +# +define tor::onionbalance::key( + $key_content, + $group, +){ + + if $key_content =~ /^\// { + $content = file($key_content) + } else { + $content = $key_content + } + Package<| tag == 'onionbalance' |> -> file{ + "/etc/onionbalance/${name}.key": + content => $content, + owner => root, + group => $group, + mode => '0640', + notify => Service['onionbalance']; + } +} |