summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-10-09 00:00:20 -0400
committerJesse Luehrs <doy@tozt.net>2018-10-09 00:00:20 -0400
commit955a2390c00731be4d61eaff2ea05bfee08118d0 (patch)
tree230e061a8c2b93d33f7c2cc6936bcf90c7370ec0 /modules
parentb76d5791eb1f62fcb6e2848dff13781d557a3de2 (diff)
downloadpuppet-tozt-955a2390c00731be4d61eaff2ea05bfee08118d0.tar.gz
puppet-tozt-955a2390c00731be4d61eaff2ea05bfee08118d0.zip
refactor
Diffstat (limited to 'modules')
-rw-r--r--modules/package/manifests/makepkg.pp8
-rw-r--r--modules/tozt/manifests/users.pp4
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/package/manifests/makepkg.pp b/modules/package/manifests/makepkg.pp
index 2373abf..7692b17 100644
--- a/modules/package/manifests/makepkg.pp
+++ b/modules/package/manifests/makepkg.pp
@@ -1,4 +1,4 @@
-define package::makepkg($ensure, $asdeps=false) {
+define package::makepkg($ensure, $build_user, $asdeps=false) {
if $asdeps {
$extra_cmdline = " --asdeps"
}
@@ -13,15 +13,15 @@ define package::makepkg($ensure, $asdeps=false) {
command => "
cd /tmp
rm -rf 'makepkg-$name'
- su doy -c 'git clone https://aur.archlinux.org/$name.git makepkg-$name'
+ su $build_user -c 'git clone https://aur.archlinux.org/$name.git makepkg-$name'
cd 'makepkg-$name'
- su doy -c makepkg
+ su $build_user -c makepkg
pacman -U --noconfirm --needed $extra_cmdline $name-*.pkg.tar.xz
",
unless => "pacman -Q $name > /dev/null 2>&1",
path => "/usr/bin",
require => [
- Tozt::User["doy"],
+ Tozt::User[$build_user],
Package["git"],
Package["pkgconf"],
];
diff --git a/modules/tozt/manifests/users.pp b/modules/tozt/manifests/users.pp
index b07373b..8576f35 100644
--- a/modules/tozt/manifests/users.pp
+++ b/modules/tozt/manifests/users.pp
@@ -8,4 +8,8 @@ class tozt::users {
extra_groups => ['wheel'],
homedir_mode => '0701';
}
+
+ Package::Makepkg {
+ build_user => 'doy',
+ }
}