diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-05-08 23:37:21 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-05-08 23:37:21 -0300 |
commit | 0645d5877476c06b54eacbf15fda5731cf8339ec (patch) | |
tree | de364b3501de71bb52ab44bfff9c3ac76d3ab99e | |
parent | b83a46139cecbf9cdf8c6c8469f1b1e79556d4a2 (diff) | |
download | puppet-reprepro-0645d5877476c06b54eacbf15fda5731cf8339ec.tar.gz puppet-reprepro-0645d5877476c06b54eacbf15fda5731cf8339ec.tar.bz2 |
Adding /usr/local/bin/reprepro-export-key
-rw-r--r-- | manifests/init.pp | 15 | ||||
-rw-r--r-- | templates/reprepro-export-key.sh.erb | 4 |
2 files changed, 15 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 99f46aa..dd0d247 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -90,6 +90,13 @@ class reprepro { "$basedir/.gnupg": mode => 750, owner => reprepro, group => root, ensure => directory; + + "/usr/local/bin/reprepro-export-key": + ensure => present, + content => template('reprepro/reprepro-export-key.sh.erb'), + owner => root, + group => root, + mode => 755, } exec { @@ -103,11 +110,11 @@ class reprepro { user => reprepro, subscribe => File["$basedir/conf/distributions"], path => "/usr/bin:/bin"; - "gpg --export -a `gpg --with-colon --list-secret-keys | cut -d : -f 5 | head -1` > $basedir/key.asc": - creates => "$basedir/key.asc", - user => reprepro, + "/usr/local/bin/reprepro-export-key": + creates => "$basedir/key.asc", + user => reprepro, subscribe => File["$basedir/.gnupg"], - path => "/usr/bin:/bin"; + require => File["/usr/local/bin/reprepro-export-key"], } cron { reprepro: diff --git a/templates/reprepro-export-key.sh.erb b/templates/reprepro-export-key.sh.erb new file mode 100644 index 0000000..f6584ae --- /dev/null +++ b/templates/reprepro-export-key.sh.erb @@ -0,0 +1,4 @@ +#!/bin/bash + +KEY="`gpg --with-colon --list-secret-keys | cut -d : -f 5 | head -1`" +gpg --export -a $KEY > <%= basedir %>/key.asc |