summaryrefslogtreecommitdiffstats
path: root/modules/package
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-10-19 23:15:14 -0400
committerJesse Luehrs <doy@tozt.net>2018-10-19 23:15:14 -0400
commit8317b706d7a0a91c67c46950be07d40168705b6c (patch)
tree0dbba9df21c01deb1ed165fda1dce43dbdd8e2d5 /modules/package
parentd0ef063b3d2cf7b4c2eba540a0773dae3afc26ef (diff)
downloadpuppet-tozt-8317b706d7a0a91c67c46950be07d40168705b6c.tar.gz
puppet-tozt-8317b706d7a0a91c67c46950be07d40168705b6c.zip
rename modules dir
Diffstat (limited to 'modules/package')
-rw-r--r--modules/package/manifests/cargo.pp39
-rw-r--r--modules/package/manifests/makepkg.pp41
2 files changed, 0 insertions, 80 deletions
diff --git a/modules/package/manifests/cargo.pp b/modules/package/manifests/cargo.pp
deleted file mode 100644
index 2f599b9..0000000
--- a/modules/package/manifests/cargo.pp
+++ /dev/null
@@ -1,39 +0,0 @@
-define package::cargo($package, $user, $ensure, $home=undef) {
- $_home = $home ? {
- undef => $user ? {
- 'root' => '/root',
- default => "/home/$user",
- },
- default => $home,
- }
-
- case $ensure {
- 'installed': {
- exec { "cargo install $package for $user":
- provider => "shell",
- command => "cargo install $package",
- unless => "cargo install --list | grep -q '^$package'",
- user => $user,
- timeout => 3600,
- require => [
- User[$user],
- Rust::User[$user],
- File["${_home}/.cargo"],
- ];
- }
- }
- 'absent': {
- exec { "cargo uninstall $package for $user":
- provider => "shell",
- command => "cargo uninstall $package",
- onlyif => "cargo install --list | grep -q '^$package'",
- user => $user,
- require => [
- User[$user],
- Rust::User[$user],
- File["${_home}/.cargo"],
- ];
- }
- }
- }
-}
diff --git a/modules/package/manifests/makepkg.pp b/modules/package/manifests/makepkg.pp
deleted file mode 100644
index c9d0318..0000000
--- a/modules/package/manifests/makepkg.pp
+++ /dev/null
@@ -1,41 +0,0 @@
-define package::makepkg($ensure, $build_user, $asdeps=false) {
- if $asdeps {
- $extra_cmdline = " --asdeps"
- }
- else {
- $extra_cmdline = ""
- }
-
- include c_toolchain
- include git
-
- case $ensure {
- 'installed': {
- exec { "makepkg install $name":
- provider => "shell",
- command => "
- cd /tmp
- rm -rf 'makepkg-$name'
- su $build_user -c 'git clone https://aur.archlinux.org/$name.git makepkg-$name'
- cd 'makepkg-$name'
- 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 => [
- Class["git"],
- Class["c_toolchain"],
- ];
- }
- }
- 'absent': {
- exec { "makepkg uninstall $name":
- provider => "shell",
- command => "pacman --noconfirm -Rsn $name",
- onlyif => "pacman -Q $name > /dev/null 2>&1",
- path => "/usr/bin";
- }
- }
- }
-}