summaryrefslogtreecommitdiffstats
path: root/modules/package
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-11-05 14:01:45 -0500
committerJesse Luehrs <doy@tozt.net>2017-11-05 14:01:45 -0500
commite8328f2a365fe9195edbc1393d9903b95618ce9a (patch)
tree7f131af1d3d3381b34878ff159508d464dd06a0d /modules/package
parentb138fce1b9edff904f057f6d9612e0fb8c9653ea (diff)
downloadpuppet-tozt-e8328f2a365fe9195edbc1393d9903b95618ce9a.tar.gz
puppet-tozt-e8328f2a365fe9195edbc1393d9903b95618ce9a.zip
add module to install packages with yaourt
Diffstat (limited to 'modules/package')
-rw-r--r--modules/package/manifests/yaourt.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/package/manifests/yaourt.pp b/modules/package/manifests/yaourt.pp
new file mode 100644
index 0000000..8f86534
--- /dev/null
+++ b/modules/package/manifests/yaourt.pp
@@ -0,0 +1,13 @@
+define package::yaourt($asdeps=false) {
+ if $asdeps {
+ $_asdeps = " --asdeps"
+ }
+ else {
+ $_asdeps = ""
+ }
+
+ exec { "/usr/bin/yaourt --noconfirm --needed$asdeps $name":
+ unless => "pacman -Q $name > /dev/null 2>&1",
+ require => Package::Makepkg["yaourt"];
+ }
+}