From 5a55d6224007f7ac0d0e6bd5f649e50b7d60ae3d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 3 Feb 2017 08:44:59 -0200 Subject: Adds ensure param to utils classes --- manifests/utils/android.pp | 6 ++++-- manifests/utils/astronomy.pp | 6 ++++-- manifests/utils/base.pp | 6 ++++-- manifests/utils/bitcoin.pp | 8 +++++--- manifests/utils/desktop.pp | 6 ++++-- manifests/utils/desktop/cinnamon.pp | 6 ++++-- manifests/utils/desktop/gnome.pp | 6 ++++-- manifests/utils/desktop/vnc.pp | 6 ++++-- manifests/utils/development/debian.pp | 6 ++++-- manifests/utils/development/gis.pp | 6 ++++-- manifests/utils/development/git.pp | 6 ++++-- manifests/utils/development/ide.pp | 6 ++++-- manifests/utils/development/mediawiki.pp | 6 ++++-- manifests/utils/development/puppet.pp | 6 ++++-- manifests/utils/development/python.pp | 6 ++++-- manifests/utils/development/reverse.pp | 6 ++++-- manifests/utils/development/system.pp | 8 +++++--- manifests/utils/development/toolchain.pp | 6 ++++-- manifests/utils/development/vcs.pp | 6 ++++-- manifests/utils/development/web.pp | 6 ++++-- manifests/utils/dns.pp | 6 ++++-- manifests/utils/doc.pp | 6 ++++-- manifests/utils/finance.pp | 6 ++++-- manifests/utils/firmware.pp | 6 ++++-- manifests/utils/firmware/iwlwifi.pp | 6 ++++-- manifests/utils/firmware/ralink.pp | 6 ++++-- manifests/utils/firmware/realtek.pp | 6 ++++-- manifests/utils/firmware/tools.pp | 6 ++++-- manifests/utils/grub.pp | 6 ++++-- manifests/utils/hamradio.pp | 6 ++++-- manifests/utils/http.pp | 6 ++++-- manifests/utils/interface/console.pp | 6 ++++-- manifests/utils/java.pp | 11 ++++++++--- manifests/utils/laptop/thinkpad/battery.pp | 5 +++-- manifests/utils/latex.pp | 6 ++++-- manifests/utils/microcode/intel.pp | 6 ++++-- manifests/utils/monkeysphere.pp | 6 ++++-- manifests/utils/multimedia/cdplayer.pp | 6 ++++-- manifests/utils/multimedia/downloaders.pp | 6 ++++-- manifests/utils/multimedia/extractors.pp | 6 ++++-- manifests/utils/multimedia/gnash.pp | 11 ++++++++--- manifests/utils/multimedia/mediacenter.pp | 6 ++++-- manifests/utils/multimedia/minimal.pp | 6 ++++-- manifests/utils/multimedia/ripper.pp | 6 ++++-- manifests/utils/multimedia/scanner.pp | 6 ++++-- manifests/utils/multimedia/shockwave.pp | 11 ++++++++--- manifests/utils/multimedia/studio.pp | 10 ++++++---- manifests/utils/network/analyzer.pp | 8 +++++--- manifests/utils/network/irssi.pp | 10 ++++++---- manifests/utils/network/mail.pp | 6 ++++-- manifests/utils/network/nfs.pp | 6 ++++-- manifests/utils/network/pppoe.pp | 6 ++++-- manifests/utils/network/pptp.pp | 6 ++++-- manifests/utils/network/samba.pp | 6 ++++-- manifests/utils/network/snort.pp | 6 ++++-- manifests/utils/network/torrent.pp | 6 ++++-- manifests/utils/network/wicd.pp | 6 ++++-- manifests/utils/network/xmpp.pp | 6 ++++-- manifests/utils/office.pp | 4 +++- manifests/utils/office/console.pp | 6 ++++-- manifests/utils/office/gui.pp | 6 ++++-- manifests/utils/office/hp.pp | 6 ++++-- manifests/utils/physical.pp | 22 +++++++--------------- manifests/utils/plug.pp | 6 ++++-- manifests/utils/printer.pp | 6 ++++-- manifests/utils/raspberrypi.pp | 6 ++++-- manifests/utils/sdr.pp | 2 +- manifests/utils/security/apparmor.pp | 6 ++++-- manifests/utils/security/base.pp | 6 ++++-- manifests/utils/security/bitmask.pp | 8 +++++--- manifests/utils/security/forensics.pp | 6 ++++-- manifests/utils/security/grsec.pp | 6 ++++-- manifests/utils/security/stego.pp | 6 ++++-- manifests/utils/security/tails.pp | 6 ++++-- manifests/utils/security/tpm.pp | 6 ++++-- manifests/utils/storage.pp | 6 ++++-- manifests/utils/storage/archive.pp | 11 +++++++---- manifests/utils/storage/crypto.pp | 6 ++++-- manifests/utils/storage/iso.pp | 8 +++++--- manifests/utils/storage/layer.pp | 6 ++++-- manifests/utils/suckless.pp | 6 ++++-- manifests/utils/thinkpad.pp | 8 +++++--- manifests/utils/tor.pp | 6 ++++-- manifests/utils/touchpad.pp | 6 ++++-- manifests/utils/virtual.pp | 8 +++++--- manifests/utils/web/console.pp | 6 ++++-- manifests/utils/web/gui.pp | 16 ++++++++++++---- 87 files changed, 380 insertions(+), 203 deletions(-) (limited to 'manifests/utils') diff --git a/manifests/utils/android.pp b/manifests/utils/android.pp index 700f0ae..b3f9d29 100644 --- a/manifests/utils/android.pp +++ b/manifests/utils/android.pp @@ -1,9 +1,11 @@ -class nodo::utils::android { +class nodo::utils::android ( + $ensure = 'installed', +) { package { [ 'android-tools-adb', 'android-tools-fastboot', 'android-tools-fsutils', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/astronomy.pp b/manifests/utils/astronomy.pp index a41ffe6..5bd6893 100644 --- a/manifests/utils/astronomy.pp +++ b/manifests/utils/astronomy.pp @@ -1,7 +1,9 @@ -class nodo::utils::astronomy { +class nodo::utils::astronomy ( + $ensure = 'installed', +) { package { [ 'stellarium', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/base.pp b/manifests/utils/base.pp index 2762949..cd6e1d4 100644 --- a/manifests/utils/base.pp +++ b/manifests/utils/base.pp @@ -1,4 +1,6 @@ -class nodo::utils::base { +class nodo::utils::base ( + $ensure = 'installed', +) { package { [ 'screen', 'less', @@ -22,7 +24,7 @@ class nodo::utils::base { 'bash-completion', 'zsh', ]: - ensure => installed, + ensure => $ensure, } # Not using right now diff --git a/manifests/utils/bitcoin.pp b/manifests/utils/bitcoin.pp index 6a63300..afa94ca 100644 --- a/manifests/utils/bitcoin.pp +++ b/manifests/utils/bitcoin.pp @@ -1,14 +1,16 @@ -class nodo::utils::bitcoin { +class nodo::utils::bitcoin ( + $ensure = 'installed', +) { package { [ 'electrum', ]: - ensure => present, + ensure => $ensure, } # To be considered #package { [ # 'armory', #]: - # ensure => present, + # ensure => $ensure, #} } diff --git a/manifests/utils/desktop.pp b/manifests/utils/desktop.pp index 0c13478..19bf941 100644 --- a/manifests/utils/desktop.pp +++ b/manifests/utils/desktop.pp @@ -1,8 +1,10 @@ # Common utilities for desktop -class nodo::utils::desktop { +class nodo::utils::desktop ( + $ensure = 'installed', +) { package { [ 'cups', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/desktop/cinnamon.pp b/manifests/utils/desktop/cinnamon.pp index 613c647..2ba9b55 100644 --- a/manifests/utils/desktop/cinnamon.pp +++ b/manifests/utils/desktop/cinnamon.pp @@ -1,7 +1,9 @@ -class nodo::utils::desktop::cinnamon { +class nodo::utils::desktop::cinnamon( + $ensure = 'installed', +) { package { [ 'cinnamon', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/desktop/gnome.pp b/manifests/utils/desktop/gnome.pp index 935555d..84c2bdf 100644 --- a/manifests/utils/desktop/gnome.pp +++ b/manifests/utils/desktop/gnome.pp @@ -1,8 +1,10 @@ -class nodo::utils::desktop::gnome { +class nodo::utils::desktop::gnome( + $ensure = 'installed', +) { package { [ 'gnome', 'gnome-backgrounds', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/desktop/vnc.pp b/manifests/utils/desktop/vnc.pp index 6f8bb99..c7118c6 100644 --- a/manifests/utils/desktop/vnc.pp +++ b/manifests/utils/desktop/vnc.pp @@ -1,7 +1,9 @@ -class nodo::utils::desktop::vnc { +class nodo::utils::desktop::vnc ( + $ensure = 'installed', +) { package { [ 'tightvncserver', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/development/debian.pp b/manifests/utils/development/debian.pp index 05ce69c..2c67e53 100644 --- a/manifests/utils/development/debian.pp +++ b/manifests/utils/development/debian.pp @@ -1,4 +1,6 @@ -class nodo::utils::development::debian { +class nodo::utils::development::debian ( + $ensure = 'installed', +) { package { [ 'debhelper', 'python-stdeb', @@ -27,6 +29,6 @@ class nodo::utils::development::debian { 'apt-listchanges', 'apt-forktracer', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/development/gis.pp b/manifests/utils/development/gis.pp index 1a3c412..c6238f1 100644 --- a/manifests/utils/development/gis.pp +++ b/manifests/utils/development/gis.pp @@ -1,7 +1,9 @@ -class nodo::utils::development::gis { +class nodo::utils::development::gis ( + $ensure = 'installed', +) { package { [ 'qgis' ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/development/git.pp b/manifests/utils/development/git.pp index e96c547..e37ab44 100644 --- a/manifests/utils/development/git.pp +++ b/manifests/utils/development/git.pp @@ -1,4 +1,6 @@ -class nodo::utils::development::git { +class nodo::utils::development::git ( + $ensure = 'installed', +) { package { [ 'tig', 'git-extras', @@ -11,7 +13,7 @@ class nodo::utils::development::git { #'git-gui', #'git-stuff', ]: - ensure => installed, + ensure => $ensure, } # Newer packages diff --git a/manifests/utils/development/ide.pp b/manifests/utils/development/ide.pp index 2e89273..96d92e1 100644 --- a/manifests/utils/development/ide.pp +++ b/manifests/utils/development/ide.pp @@ -1,4 +1,6 @@ -class nodo::utils::development::ide { +class nodo::utils::development::ide ( + $ensure = 'installed', +) { # In use package { [ 'mr', @@ -18,6 +20,6 @@ class nodo::utils::development::ide { #'doxygen', #'agave', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/development/mediawiki.pp b/manifests/utils/development/mediawiki.pp index a92b8d5..c31ccfe 100644 --- a/manifests/utils/development/mediawiki.pp +++ b/manifests/utils/development/mediawiki.pp @@ -1,10 +1,12 @@ -class nodo::utils::development::mediawiki { +class nodo::utils::development::mediawiki ( + $ensure = 'installed', +) { package { [ 'git-mediawiki', ]: ensure => $::lsbdistcodename ? { 'wheezy' => absent, - default => present, + default => $ensure, } } } diff --git a/manifests/utils/development/puppet.pp b/manifests/utils/development/puppet.pp index e5aac1b..ab1be92 100644 --- a/manifests/utils/development/puppet.pp +++ b/manifests/utils/development/puppet.pp @@ -1,8 +1,10 @@ -class nodo::utils::development::puppet { +class nodo::utils::development::puppet ( + $ensure = 'installed', +) { package { [ 'puppet-lint', 'hiera-eyaml', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/development/python.pp b/manifests/utils/development/python.pp index 036c0ce..9d94989 100644 --- a/manifests/utils/development/python.pp +++ b/manifests/utils/development/python.pp @@ -1,4 +1,6 @@ -class nodo::utils::development::python { +class nodo::utils::development::python ( + $ensure = 'installed', +) { package { [ 'python-setuptools', 'python-virtualenv', @@ -6,6 +8,6 @@ class nodo::utils::development::python { 'python-cheetah', 'python-unidecode', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/development/reverse.pp b/manifests/utils/development/reverse.pp index 72cf480..4702e76 100644 --- a/manifests/utils/development/reverse.pp +++ b/manifests/utils/development/reverse.pp @@ -1,7 +1,9 @@ -class nodo::utils::development::reverse { +class nodo::utils::development::reverse ( + $ensure = 'installed', +) { package { [ 'binwalk', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/development/system.pp b/manifests/utils/development/system.pp index 9e48a31..e5066fc 100644 --- a/manifests/utils/development/system.pp +++ b/manifests/utils/development/system.pp @@ -1,4 +1,6 @@ -class nodo::utils::development::system { +class nodo::utils::development::system ( + $ensure = 'installed', +) { package { [ 'debirf', 'xorriso', @@ -6,14 +8,14 @@ class nodo::utils::development::system { 'openocd', 'live-build', ]: - ensure => installed, + ensure => $ensure, } package { [ 'unetbootin', ]: ensure => $::lsbdistcodename ? { - 'wheezy' => present, + 'wheezy' => $ensure, default => absent, }, } diff --git a/manifests/utils/development/toolchain.pp b/manifests/utils/development/toolchain.pp index dbea0df..8adec01 100644 --- a/manifests/utils/development/toolchain.pp +++ b/manifests/utils/development/toolchain.pp @@ -1,4 +1,6 @@ -class nodo::utils::development::toolchain { +class nodo::utils::development::toolchain ( + $ensure = 'installed', +) { package { [ 'emdebian-archive-keyring', 'scratchbox2', @@ -6,7 +8,7 @@ class nodo::utils::development::toolchain { 'multistrap', 'fakechroot', ]: - ensure => installed, + ensure => $ensure, } # Old stuff diff --git a/manifests/utils/development/vcs.pp b/manifests/utils/development/vcs.pp index ce24148..025ea91 100644 --- a/manifests/utils/development/vcs.pp +++ b/manifests/utils/development/vcs.pp @@ -1,9 +1,11 @@ -class nodo::utils::development::vcs { +class nodo::utils::development::vcs ( + $ensure = 'installed', +) { package { [ 'subversion', 'mercurial', 'bzr', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/development/web.pp b/manifests/utils/development/web.pp index 911c634..f967cf0 100644 --- a/manifests/utils/development/web.pp +++ b/manifests/utils/development/web.pp @@ -1,8 +1,10 @@ -class nodo::utils::development::web { +class nodo::utils::development::web ( + $ensure = 'installed', +) { package { [ 'apache2-utils', 'yui-compressor', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/dns.pp b/manifests/utils/dns.pp index 01a472e..e6483ab 100644 --- a/manifests/utils/dns.pp +++ b/manifests/utils/dns.pp @@ -1,7 +1,9 @@ -class nodo::utils::dns { +class nodo::utils::dns ( + $ensure = 'installed', +) { package { [ 'dnstop', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/doc.pp b/manifests/utils/doc.pp index 5849d3e..5f75378 100644 --- a/manifests/utils/doc.pp +++ b/manifests/utils/doc.pp @@ -1,8 +1,10 @@ -class nodo::utils::doc { +class nodo::utils::doc ( + $ensure = 'installed', +) { package { [ # apt-get install anarchism! 'anarchism', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/finance.pp b/manifests/utils/finance.pp index 63a9911..6e7197c 100644 --- a/manifests/utils/finance.pp +++ b/manifests/utils/finance.pp @@ -1,4 +1,6 @@ -class nodo::utils::finance { +class nodo::utils::finance ( + $ensure = 'installed', +) { # Finance package { [ 'gnucash', @@ -6,6 +8,6 @@ class nodo::utils::finance { 'clipf', 'misery', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/firmware.pp b/manifests/utils/firmware.pp index 1be0540..0a83f02 100644 --- a/manifests/utils/firmware.pp +++ b/manifests/utils/firmware.pp @@ -1,7 +1,9 @@ -class nodo::utils::firmware { +class nodo::utils::firmware ( + $ensure = 'installed', +) { package { [ 'firmware-linux', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/firmware/iwlwifi.pp b/manifests/utils/firmware/iwlwifi.pp index 4bca68d..69e8993 100644 --- a/manifests/utils/firmware/iwlwifi.pp +++ b/manifests/utils/firmware/iwlwifi.pp @@ -1,8 +1,10 @@ # Wireless support -class nodo::utils::firmware::iwlwifi { +class nodo::utils::firmware::iwlwifi ( + $ensure = 'installed', +) { package { [ 'firmware-iwlwifi', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/firmware/ralink.pp b/manifests/utils/firmware/ralink.pp index f22bd4c..82c8d0a 100644 --- a/manifests/utils/firmware/ralink.pp +++ b/manifests/utils/firmware/ralink.pp @@ -1,7 +1,9 @@ -class nodo::utils::firmware::ralink { +class nodo::utils::firmware::ralink ( + $ensure = 'installed', +) { package { [ 'firmware-ralink', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/firmware/realtek.pp b/manifests/utils/firmware/realtek.pp index b310c28..b176a75 100644 --- a/manifests/utils/firmware/realtek.pp +++ b/manifests/utils/firmware/realtek.pp @@ -1,7 +1,9 @@ -class nodo::utils::firmware::realtek { +class nodo::utils::firmware::realtek ( + $ensure = 'installed', +) { package { [ 'firmware-realtek', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/firmware/tools.pp b/manifests/utils/firmware/tools.pp index 288bd54..46ad5b5 100644 --- a/manifests/utils/firmware/tools.pp +++ b/manifests/utils/firmware/tools.pp @@ -1,9 +1,11 @@ -class nodo::utils::firmware::tools { +class nodo::utils::firmware::tools ( + $ensure = 'installed', +) { package { [ 'flashrom', 'nvramtool', 'nvram-wakeup', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/grub.pp b/manifests/utils/grub.pp index 3dfe8ea..7cadc6b 100644 --- a/manifests/utils/grub.pp +++ b/manifests/utils/grub.pp @@ -1,7 +1,9 @@ -class nodo::utils::grub { +class nodo::utils::grub ( + $ensure = 'installed', +) { package { [ 'grub2', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/hamradio.pp b/manifests/utils/hamradio.pp index 8b72a32..6dcd382 100644 --- a/manifests/utils/hamradio.pp +++ b/manifests/utils/hamradio.pp @@ -1,7 +1,9 @@ -class nodo::utils::hamradio { +class nodo::utils::hamradio ( + $ensure = 'installed', +) { package { [ 'aldo', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/http.pp b/manifests/utils/http.pp index 3a39ff5..b8b7e78 100644 --- a/manifests/utils/http.pp +++ b/manifests/utils/http.pp @@ -1,7 +1,9 @@ -class nodo::utils::http { +class nodo::utils::http ( + $ensure = 'installed', +) { package { [ 'curl', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/interface/console.pp b/manifests/utils/interface/console.pp index 5451952..4738501 100644 --- a/manifests/utils/interface/console.pp +++ b/manifests/utils/interface/console.pp @@ -1,4 +1,6 @@ -class nodo::utils::interface::console { +class nodo::utils::interface::console ( + $ensure = 'installed', +) { package { [ 'mc', 'tmux', @@ -7,6 +9,6 @@ class nodo::utils::interface::console { 'fonts-powerline', 'ranger', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/java.pp b/manifests/utils/java.pp index ec1220f..59e26a3 100644 --- a/manifests/utils/java.pp +++ b/manifests/utils/java.pp @@ -1,4 +1,6 @@ -class nodo::utils::java { +class nodo::utils::java ( + $ensure = 'installed', +) { # Java package { [ 'sun-java6-jre', @@ -10,12 +12,15 @@ class nodo::utils::java { 'default-jre', 'openjdk-7-jre-headless', ]: - ensure => present, + ensure => $ensure, } # Java alternative file { "/etc/alternatives/java": - ensure => hiera('nodo::utils::java::alternative', '/usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java'), + ensure => $ensure ? { + 'present','installed','latest' => hiera('nodo::utils::java::alternative', '/usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java'), + default => undef, + }, owner => root, group => root, require => Package['default-jre'], diff --git a/manifests/utils/laptop/thinkpad/battery.pp b/manifests/utils/laptop/thinkpad/battery.pp index c8fdb52..c82112c 100644 --- a/manifests/utils/laptop/thinkpad/battery.pp +++ b/manifests/utils/laptop/thinkpad/battery.pp @@ -1,16 +1,17 @@ # apci-call or tp-smapi available class nodo::utils::laptop::thinkpad::battery( $implementation = 'acpi-call', + $ensure = 'installed', ) { package { [ 'tlp', ]: - ensure => present, + ensure => $ensure, } package { [ "${implementation}-dkms", ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/latex.pp b/manifests/utils/latex.pp index 8b29723..74aa72c 100644 --- a/manifests/utils/latex.pp +++ b/manifests/utils/latex.pp @@ -1,4 +1,6 @@ -class nodo::utils::latex { +class nodo::utils::latex ( + $ensure = 'installed', +) { # LaTeX package { [ 'texlive-latex-base', @@ -8,6 +10,6 @@ class nodo::utils::latex { 'vim-latexsuite', 'pdfjam', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/microcode/intel.pp b/manifests/utils/microcode/intel.pp index 7e9c565..10a32ef 100644 --- a/manifests/utils/microcode/intel.pp +++ b/manifests/utils/microcode/intel.pp @@ -1,10 +1,12 @@ -class nodo::utils::microcode::intel { +class nodo::utils::microcode::intel ( + $ensure = 'installed', +) { # Microcode # See https://wiki.archlinux.org/index.php/Microcode # http://en.gentoo-wiki.com/wiki/Intel_Microcode package { [ 'intel-microcode', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/monkeysphere.pp b/manifests/utils/monkeysphere.pp index 8da90b9..d04123e 100644 --- a/manifests/utils/monkeysphere.pp +++ b/manifests/utils/monkeysphere.pp @@ -1,4 +1,6 @@ -class nodo::utils::monkeysphere { +class nodo::utils::monkeysphere ( + $ensure = 'installed', +) { # Monkeysphere package { [ 'xul-ext-monkeysphere', @@ -6,6 +8,6 @@ class nodo::utils::monkeysphere { 'xul-ext-firebug', 'msva-perl', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/multimedia/cdplayer.pp b/manifests/utils/multimedia/cdplayer.pp index 05e88ad..e2c7a71 100644 --- a/manifests/utils/multimedia/cdplayer.pp +++ b/manifests/utils/multimedia/cdplayer.pp @@ -1,10 +1,12 @@ -class nodo::utils::multimedia::cdplayer { +class nodo::utils::multimedia::cdplayer ( + $ensure = 'installed', +) { # CD writers and extractors package { [ 'mcdp', 'cdtool', 'cd-discid', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/multimedia/downloaders.pp b/manifests/utils/multimedia/downloaders.pp index 40d610f..49aa51f 100644 --- a/manifests/utils/multimedia/downloaders.pp +++ b/manifests/utils/multimedia/downloaders.pp @@ -1,11 +1,13 @@ -class nodo::utils::multimedia::downloaders { +class nodo::utils::multimedia::downloaders ( + $ensure = 'installed', +) { # Jessie onwards package { [ 'youtube-dl', ]: ensure => $::lsbdistcodename ? { 'wheezy' => absent, - default => present, + default => $ensure, } } } diff --git a/manifests/utils/multimedia/extractors.pp b/manifests/utils/multimedia/extractors.pp index a3fde3c..909a547 100644 --- a/manifests/utils/multimedia/extractors.pp +++ b/manifests/utils/multimedia/extractors.pp @@ -1,9 +1,11 @@ -class nodo::utils::multimedia::extractors { +class nodo::utils::multimedia::extractors ( + $ensure = 'installed', +) { package { [ 'rar', 'unrar', 'zip', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/multimedia/gnash.pp b/manifests/utils/multimedia/gnash.pp index 5283534..f6cee10 100644 --- a/manifests/utils/multimedia/gnash.pp +++ b/manifests/utils/multimedia/gnash.pp @@ -1,4 +1,6 @@ -class nodo::utils::multimedia::gnash { +class nodo::utils::multimedia::gnash ( + $ensure = 'installed', +) { package { [ 'flashplugin-nonfree', ]: @@ -8,14 +10,17 @@ class nodo::utils::multimedia::gnash { package { [ 'browser-plugin-gnash', ]: - ensure => present, + ensure => $ensure, } # Flash alternative file { "/etc/alternatives/flash-mozilla.so": owner => root, group => root, - ensure => "/usr/lib/gnash/libgnashplugin.so", + ensure => $ensure ? { + 'installed','present' => "/usr/lib/gnash/libgnashplugin.so", + default => undef, + }, require => Package['browser-plugin-gnash'], } } diff --git a/manifests/utils/multimedia/mediacenter.pp b/manifests/utils/multimedia/mediacenter.pp index d3388b2..ad996c8 100644 --- a/manifests/utils/multimedia/mediacenter.pp +++ b/manifests/utils/multimedia/mediacenter.pp @@ -1,10 +1,12 @@ -class nodo::utils::multimedia::mediacenter { +class nodo::utils::multimedia::mediacenter ( + $ensure = 'installed', +) { package { [ 'xbmc', 'upnp-inspector', 'gupnp-tools', 'djmount', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/multimedia/minimal.pp b/manifests/utils/multimedia/minimal.pp index 3459daa..fe220f4 100644 --- a/manifests/utils/multimedia/minimal.pp +++ b/manifests/utils/multimedia/minimal.pp @@ -1,10 +1,12 @@ -class nodo::utils::multimedia::minimal { +class nodo::utils::multimedia::minimal ( + $ensure = 'installed', +) { package { [ 'alsa-utils', 'mpg123', 'mediainfo', 'mplayer2', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/multimedia/ripper.pp b/manifests/utils/multimedia/ripper.pp index c97908d..51b431b 100644 --- a/manifests/utils/multimedia/ripper.pp +++ b/manifests/utils/multimedia/ripper.pp @@ -1,4 +1,6 @@ -class nodo::utils::multimedia::ripper { +class nodo::utils::multimedia::ripper( + $ensure = 'installed', +) { # CD writers and extractors package { [ 'ripit', @@ -11,6 +13,6 @@ class nodo::utils::multimedia::ripper { 'eject', 'cdrdao', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/multimedia/scanner.pp b/manifests/utils/multimedia/scanner.pp index abe8b64..f8c4eca 100644 --- a/manifests/utils/multimedia/scanner.pp +++ b/manifests/utils/multimedia/scanner.pp @@ -1,7 +1,9 @@ -class nodo::utils::multimedia::scanner { +class nodo::utils::multimedia::scanner ( + $ensure = 'installed', +) { package { [ 'xsane', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/multimedia/shockwave.pp b/manifests/utils/multimedia/shockwave.pp index cf3a712..6ff22ed 100644 --- a/manifests/utils/multimedia/shockwave.pp +++ b/manifests/utils/multimedia/shockwave.pp @@ -1,16 +1,21 @@ -class nodo::utils::multimedia::shockwave { +class nodo::utils::multimedia::shockwave ( + $ensure = 'installed', +) { # See also https://github.com/i-rinat/freshplayerplugin package { [ 'flashplugin-nonfree', ]: - ensure => installed , + ensure => $ensure, } # Flash alternative file { "/etc/alternatives/flash-mozilla.so": owner => root, group => root, - ensure => "/usr/lib/flashplugin-nonfree/libflashplayer.so", + ensure => $ensure ? { + 'present','installed' => "/usr/lib/flashplugin-nonfree/libflashplayer.so", + default => undef, + }, require => Package['flashplugin-nonfree'], } } diff --git a/manifests/utils/multimedia/studio.pp b/manifests/utils/multimedia/studio.pp index 742cf9c..72b42b1 100644 --- a/manifests/utils/multimedia/studio.pp +++ b/manifests/utils/multimedia/studio.pp @@ -1,10 +1,12 @@ -class nodo::utils::multimedia::studio { +class nodo::utils::multimedia::studio ( + $ensure = 'installed', +) { package { [ 'ardour', 'hydrogen', 'mixxx', ]: - ensure => installed, + ensure => $ensure, } # Instruments @@ -14,7 +16,7 @@ class nodo::utils::multimedia::studio { 'rakarrack', 'tuxguitar-jack', ]: - ensure => installed, + ensure => $ensure, } # LADSPA plugins @@ -24,6 +26,6 @@ class nodo::utils::multimedia::studio { 'tap-plugins', 'invada-studio-plugins-ladspa', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/network/analyzer.pp b/manifests/utils/network/analyzer.pp index c3f4f41..7a30892 100644 --- a/manifests/utils/network/analyzer.pp +++ b/manifests/utils/network/analyzer.pp @@ -1,4 +1,6 @@ -class nodo::utils::network::analyzer { +class nodo::utils::network::analyzer ( + $ensure = 'installed', +) { package { [ 'tshark', 'arping', @@ -9,14 +11,14 @@ class nodo::utils::network::analyzer { 'iperf', 'zmap', ]: - ensure => installed, + ensure => $ensure, } # https://www.linode.com/docs/networking/diagnosing-network-issues-with-mtr package { [ 'mtr', ]: - ensure => present, + ensure => $ensure, } # Not in use diff --git a/manifests/utils/network/irssi.pp b/manifests/utils/network/irssi.pp index e6416b3..4ffd886 100644 --- a/manifests/utils/network/irssi.pp +++ b/manifests/utils/network/irssi.pp @@ -1,10 +1,12 @@ -class nodo::utils::network::irssi { +class nodo::utils::network::irssi ( + $ensure = 'installed', +) { package { [ 'irssi', 'bitlbee', 'irssi-scripts', ]: - ensure => installed, + ensure => $ensure, } package { [ @@ -17,7 +19,7 @@ class nodo::utils::network::irssi { package { [ 'irssi-plugin-otr', ]: - ensure => installed, + ensure => $ensure, } # These are needed by the cap_sasl.pl irssi plugin @@ -26,7 +28,7 @@ class nodo::utils::network::irssi { 'libcrypt-dh-perl', 'libcrypt-openssl-bignum-perl', ]: - ensure => installed, + ensure => $ensure, } # Not on wheezy diff --git a/manifests/utils/network/mail.pp b/manifests/utils/network/mail.pp index 5c2b07f..281ced1 100644 --- a/manifests/utils/network/mail.pp +++ b/manifests/utils/network/mail.pp @@ -1,4 +1,6 @@ -class nodo::utils::network::mail { +class nodo::utils::network::mail ( + $ensure = 'installed', +) { # Mail package { [ 'mutt', @@ -11,7 +13,7 @@ class nodo::utils::network::mail { 'procmail', 'msmtp', ]: - ensure => installed, + ensure => $ensure, } # Fix: ensure that fetchmail is not a service diff --git a/manifests/utils/network/nfs.pp b/manifests/utils/network/nfs.pp index 19072fa..7bc817c 100644 --- a/manifests/utils/network/nfs.pp +++ b/manifests/utils/network/nfs.pp @@ -1,7 +1,9 @@ -class nodo::utils::network::nfs { +class nodo::utils::network::nfs ( + $ensure = 'installed', +) { package { [ 'nfs-common', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/network/pppoe.pp b/manifests/utils/network/pppoe.pp index db4e085..a9a62f4 100644 --- a/manifests/utils/network/pppoe.pp +++ b/manifests/utils/network/pppoe.pp @@ -1,9 +1,11 @@ -class nodo::utils::network::pppoe { +class nodo::utils::network::pppoe ( + $ensure = 'installed', +) { package { [ 'ppp', 'pppoe', 'pppoeconf', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/network/pptp.pp b/manifests/utils/network/pptp.pp index bdd4776..8e8db9a 100644 --- a/manifests/utils/network/pptp.pp +++ b/manifests/utils/network/pptp.pp @@ -1,7 +1,9 @@ -class nodo::utils::network::pptp { +class nodo::utils::network::pptp ( + $ensure = 'installed', +) { package { [ 'pptp-linux', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/network/samba.pp b/manifests/utils/network/samba.pp index ee9fc82..e5a3ff5 100644 --- a/manifests/utils/network/samba.pp +++ b/manifests/utils/network/samba.pp @@ -1,9 +1,11 @@ -class nodo::utils::network::samba { +class nodo::utils::network::samba ( + $ensure = 'installed', +) { package { [ 'smbclient', 'cifs-utils', 'nbtscan', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/network/snort.pp b/manifests/utils/network/snort.pp index 8b14413..a94dc8a 100644 --- a/manifests/utils/network/snort.pp +++ b/manifests/utils/network/snort.pp @@ -1,7 +1,9 @@ -class nodo::utils::network::snort { +class nodo::utils::network::snort ( + $ensure = 'installed', +) { package { [ 'snort', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/network/torrent.pp b/manifests/utils/network/torrent.pp index 027e2b8..e6f6771 100644 --- a/manifests/utils/network/torrent.pp +++ b/manifests/utils/network/torrent.pp @@ -1,7 +1,9 @@ -class nodo::utils::network::torrent { +class nodo::utils::network::torrent ( + $ensure = 'installed', +) { package { [ 'rtorrent', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/network/wicd.pp b/manifests/utils/network/wicd.pp index 065d5bb..86af12a 100644 --- a/manifests/utils/network/wicd.pp +++ b/manifests/utils/network/wicd.pp @@ -1,9 +1,11 @@ -class nodo::utils::network::wicd { +class nodo::utils::network::wicd ( + $ensure = 'installed', +) { package { [ 'wicd', 'wicd-curses', #'wicd-gtk', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/network/xmpp.pp b/manifests/utils/network/xmpp.pp index 8b2c49e..9870338 100644 --- a/manifests/utils/network/xmpp.pp +++ b/manifests/utils/network/xmpp.pp @@ -1,4 +1,6 @@ -class nodo::utils::network::xmpp { +class nodo::utils::network::xmpp ( + $ensure = 'installed', +) { package { [ 'pidgin', 'pidgin-encryption', @@ -7,6 +9,6 @@ class nodo::utils::network::xmpp { 'pidgin-privacy-please', 'pidgin-plugin-pack', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/office.pp b/manifests/utils/office.pp index 690bde5..eeb6d2e 100644 --- a/manifests/utils/office.pp +++ b/manifests/utils/office.pp @@ -1,4 +1,6 @@ -class nodo::utils::office { +class nodo::utils::office ( + $ensure = 'installed', +) { # Not in use package { [ 'kalarm', diff --git a/manifests/utils/office/console.pp b/manifests/utils/office/console.pp index a30aaeb..7233d0d 100644 --- a/manifests/utils/office/console.pp +++ b/manifests/utils/office/console.pp @@ -1,4 +1,6 @@ -class nodo::utils::office::console { +class nodo::utils::office::console ( + $ensure = 'installed', +) { package { [ 'vim-gtk', 'wyrd', @@ -10,6 +12,6 @@ class nodo::utils::office::console { 'mat', #'worklog', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/office/gui.pp b/manifests/utils/office/gui.pp index 434dede..3bb43fe 100644 --- a/manifests/utils/office/gui.pp +++ b/manifests/utils/office/gui.pp @@ -1,4 +1,6 @@ -class nodo::utils::office::gui { +class nodo::utils::office::gui ( + $ensure = 'installed', +) { package { [ 'gobby', 'libreoffice', @@ -8,6 +10,6 @@ class nodo::utils::office::gui { #'evince', #'aewan', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/office/hp.pp b/manifests/utils/office/hp.pp index 193eb46..17767c7 100644 --- a/manifests/utils/office/hp.pp +++ b/manifests/utils/office/hp.pp @@ -1,7 +1,9 @@ -class nodo::utils::office::hp { +class nodo::utils::office::hp ( + $ensure = 'installed', +) { package { [ 'hplip-gui', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/physical.pp b/manifests/utils/physical.pp index 1ea6b13..89f6064 100644 --- a/manifests/utils/physical.pp +++ b/manifests/utils/physical.pp @@ -1,5 +1,7 @@ # Common utilities for physical -class nodo::utils::physical { +class nodo::utils::physical ( + $ensure = 'installed', +) { package { [ 'nload', 'acpid', @@ -22,7 +24,7 @@ class nodo::utils::physical { 'powertop', 'bwm-ng', ]: - ensure => installed, + ensure => $ensure, } package { [ @@ -32,26 +34,16 @@ class nodo::utils::physical { 'armv5tel' => absent, 'armv6l' => absent, 'armv7l' => absent, - default => present, + default => $ensure, } } - # - # Testers / health check - # - - #package { [ - # 'memtester', - #]: - # ensure => present, - #} - package { [ 'memtest86+', ]: ensure => $::architecture ? { - 'amd64' => present, - default => absent, + 'amd64' => $ensure, + default => absent, } } } diff --git a/manifests/utils/plug.pp b/manifests/utils/plug.pp index 86298f9..b4e009b 100644 --- a/manifests/utils/plug.pp +++ b/manifests/utils/plug.pp @@ -1,5 +1,7 @@ # Common utilities for plug computers -class nodo::utils::plug { +class nodo::utils::plug ( + $ensure = 'installed', +) { package { [ 'mtd-utils', 'cryptsetup', @@ -7,6 +9,6 @@ class nodo::utils::plug { 'smartmontools', 'u-boot-tools', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/printer.pp b/manifests/utils/printer.pp index 2b1875a..3aa7096 100644 --- a/manifests/utils/printer.pp +++ b/manifests/utils/printer.pp @@ -1,4 +1,6 @@ -class nodo::utils::printer { +class nodo::utils::printer ( + $ensure = 'installed', +) { package { [ 'cups-client', 'hplip', @@ -6,6 +8,6 @@ class nodo::utils::printer { 'printer-driver-hpcups', 'hpijs-ppds', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/raspberrypi.pp b/manifests/utils/raspberrypi.pp index 7b5fac4..dd47e97 100644 --- a/manifests/utils/raspberrypi.pp +++ b/manifests/utils/raspberrypi.pp @@ -1,7 +1,9 @@ -class nodo::utils::raspberrypi { +class nodo::utils::raspberrypi ( + $ensure = 'installed', +) { package { [ 'usbutils', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/sdr.pp b/manifests/utils/sdr.pp index 443e58d..a5f719b 100644 --- a/manifests/utils/sdr.pp +++ b/manifests/utils/sdr.pp @@ -1,5 +1,5 @@ class nodo::utils::sdr( - $ensure = 'present', + $ensure = 'installed', ) { package { [ 'rtl-srd', diff --git a/manifests/utils/security/apparmor.pp b/manifests/utils/security/apparmor.pp index 527ae12..4d5a15b 100644 --- a/manifests/utils/security/apparmor.pp +++ b/manifests/utils/security/apparmor.pp @@ -1,9 +1,11 @@ -class nodo::utils::security::apparmor { +class nodo::utils::security::apparmor ( + $ensure = 'installed', +) { package { [ 'apparmor', 'apparmor-profiles', 'apparmor-utils', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/security/base.pp b/manifests/utils/security/base.pp index b639e8c..9eef991 100644 --- a/manifests/utils/security/base.pp +++ b/manifests/utils/security/base.pp @@ -1,9 +1,11 @@ -class nodo::utils::security::base { +class nodo::utils::security::base ( + $ensure = 'installed', +) { package { [ 'keychain', 'gnupg-curl', #'hopenpgp-tools', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/security/bitmask.pp b/manifests/utils/security/bitmask.pp index 13dea90..025418a 100644 --- a/manifests/utils/security/bitmask.pp +++ b/manifests/utils/security/bitmask.pp @@ -1,15 +1,17 @@ -class nodo::utils::security::bitmask { +class nodo::utils::security::bitmask ( + $ensure = 'installed', +) { # You need to manually add https://dl.bitmask.net/apt.key into apt keyring ::apt::sources_list { 'bitmask.net.list': content => "deb http://deb.bitmask.net/debian wheezy main\n", - ensure => present, + ensure => $ensure, } package { [ 'bitmask', 'leap-keyring', ]: - ensure => present, + ensure => $ensure, require => Apt::Sources_list['bitmask.net.list'], } } diff --git a/manifests/utils/security/forensics.pp b/manifests/utils/security/forensics.pp index 665b1c7..f0cfe82 100644 --- a/manifests/utils/security/forensics.pp +++ b/manifests/utils/security/forensics.pp @@ -1,8 +1,10 @@ # See https://qa.debian.org/developer.php?login=forensics-devel%40lists.alioth.debian.org -class nodo::utils::security::forensics { +class nodo::utils::security::forensics ( + $ensure = 'installed', +) { package { [ 'lime-forensics-dkms', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/security/grsec.pp b/manifests/utils/security/grsec.pp index c978088..fc63621 100644 --- a/manifests/utils/security/grsec.pp +++ b/manifests/utils/security/grsec.pp @@ -1,4 +1,6 @@ -class nodo::utils::security::grsec { +class nodo::utils::security::grsec ( + $ensure = 'installed', +) { package { [ # The package with the specific image version might not be used # but right now apt is complaining of unmet dependencies when @@ -8,6 +10,6 @@ class nodo::utils::security::grsec { 'linux-image-grsec-amd64', 'paxtest', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/security/stego.pp b/manifests/utils/security/stego.pp index 795c243..b5fc27d 100644 --- a/manifests/utils/security/stego.pp +++ b/manifests/utils/security/stego.pp @@ -1,4 +1,6 @@ -class nodo::utils::security::stego { +class nodo::utils::security::stego ( + $ensure = 'installed', +) { package { [ 'snow', 'stegsnow', @@ -6,6 +8,6 @@ class nodo::utils::security::stego { 'snowdrop', 'python-stepic', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/security/tails.pp b/manifests/utils/security/tails.pp index dc3746b..8cafd4a 100644 --- a/manifests/utils/security/tails.pp +++ b/manifests/utils/security/tails.pp @@ -1,7 +1,9 @@ -class nodo::utils::security::tails { +class nodo::utils::security::tails ( + $ensure = 'installed', +) { package { [ 'tails-installer', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/security/tpm.pp b/manifests/utils/security/tpm.pp index 32d2576..6d63df2 100644 --- a/manifests/utils/security/tpm.pp +++ b/manifests/utils/security/tpm.pp @@ -1,8 +1,10 @@ -class nodo::utils::security::tpm { +class nodo::utils::security::tpm ( + $ensure = 'installed', +) { package { [ 'trousers', 'tpm-tools', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/storage.pp b/manifests/utils/storage.pp index 7a354db..81bc314 100644 --- a/manifests/utils/storage.pp +++ b/manifests/utils/storage.pp @@ -1,8 +1,10 @@ # Common utilities for storage -class nodo::utils::storage { +class nodo::utils::storage ( + $ensure = 'installed', +) { package { [ 'clamav', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/storage/archive.pp b/manifests/utils/storage/archive.pp index 4082fe2..0c3f5cc 100644 --- a/manifests/utils/storage/archive.pp +++ b/manifests/utils/storage/archive.pp @@ -1,8 +1,11 @@ -class nodo::utils::storage::archive { +class nodo::utils::storage::archive ( + $ensure = 'installed', +) { package { [ 'git-annex', ]: - ensure => latest, + #ensure => latest, + ensure => $ensure, } # Not in use @@ -18,8 +21,8 @@ class nodo::utils::storage::archive { 'syslinux-utils', ]: ensure => $::architecture ? { - 'amd64' => present, - 'i386' => present, + 'amd64' => $ensure, + 'i386' => $ensure, default => absent, }, } diff --git a/manifests/utils/storage/crypto.pp b/manifests/utils/storage/crypto.pp index 0a0d520..0de92c0 100644 --- a/manifests/utils/storage/crypto.pp +++ b/manifests/utils/storage/crypto.pp @@ -1,8 +1,10 @@ -class nodo::utils::storage::crypto { +class nodo::utils::storage::crypto ( + $ensure = 'installed', +) { package { [ 'cryptsetup', 'ecryptfs-utils', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/storage/iso.pp b/manifests/utils/storage/iso.pp index f271dcd..5f841ce 100644 --- a/manifests/utils/storage/iso.pp +++ b/manifests/utils/storage/iso.pp @@ -1,10 +1,12 @@ -class nodo::utils::storage::iso { +class nodo::utils::storage::iso ( + $ensure = 'installed', +) { package { [ 'syslinux', ]: ensure => $::architecture ? { - 'amd64' => present, - 'i386' => present, + 'amd64' => $ensure, + 'i386' => $ensure, default => absent, }, } diff --git a/manifests/utils/storage/layer.pp b/manifests/utils/storage/layer.pp index 7951573..1f55887 100644 --- a/manifests/utils/storage/layer.pp +++ b/manifests/utils/storage/layer.pp @@ -1,10 +1,12 @@ -class nodo::utils::storage::layer { +class nodo::utils::storage::layer ( + $ensure = 'installed', +) { include nodo::utils::storage::crypto package { [ 'mdadm', 'lvm2', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/suckless.pp b/manifests/utils/suckless.pp index b17dc34..9bc0e86 100644 --- a/manifests/utils/suckless.pp +++ b/manifests/utils/suckless.pp @@ -1,4 +1,6 @@ -class nodo::utils::suckless { +class nodo::utils::suckless ( + $ensure = 'installed', +) { package { [ 'dwm', 'mupdf', @@ -10,6 +12,6 @@ class nodo::utils::suckless { 'xxxterm', 'stterm', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/thinkpad.pp b/manifests/utils/thinkpad.pp index ae25178..a712048 100644 --- a/manifests/utils/thinkpad.pp +++ b/manifests/utils/thinkpad.pp @@ -1,9 +1,11 @@ -class nodo::utils::thinkpad { +class nodo::utils::thinkpad ( + $ensure = 'installed', +) { # Keyboard package { [ 'tpb', ]: - ensure => installed, + ensure => $ensure, } # Thinkfan @@ -17,6 +19,6 @@ class nodo::utils::thinkpad { package { [ 'hdapsd', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/tor.pp b/manifests/utils/tor.pp index 66dc53f..e229009 100644 --- a/manifests/utils/tor.pp +++ b/manifests/utils/tor.pp @@ -1,7 +1,9 @@ -class nodo::utils::tor { +class nodo::utils::tor ( + $ensure = 'installed', +) { package { [ 'tor-arm', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/touchpad.pp b/manifests/utils/touchpad.pp index e9683f4..07d0215 100644 --- a/manifests/utils/touchpad.pp +++ b/manifests/utils/touchpad.pp @@ -1,8 +1,10 @@ -class nodo::utils::touchpad { +class nodo::utils::touchpad ( + $ensure = 'installed', +) { # Touchpad package { [ 'gpointing-device-settings', ]: - ensure => present, + ensure => $ensure, } } diff --git a/manifests/utils/virtual.pp b/manifests/utils/virtual.pp index 3678997..b521d38 100644 --- a/manifests/utils/virtual.pp +++ b/manifests/utils/virtual.pp @@ -1,4 +1,6 @@ -class nodo::utils::virtual { +class nodo::utils::virtual ( + $ensure = 'installed', +) { package { [ # For running virtual machines 'qemu', @@ -10,7 +12,7 @@ class nodo::utils::virtual { 'spice-client', 'spice-client-gtk', ]: - ensure => present, + ensure => $ensure, } # We're not managing this package as we're favouring the @@ -18,6 +20,6 @@ class nodo::utils::virtual { #package { [ # 'virtualbox-fuse', #]: - # ensure => present, + # ensure => $ensure, #} } diff --git a/manifests/utils/web/console.pp b/manifests/utils/web/console.pp index 112a97b..07d1473 100644 --- a/manifests/utils/web/console.pp +++ b/manifests/utils/web/console.pp @@ -1,4 +1,6 @@ -class nodo::utils::web::console { +class nodo::utils::web::console ( + $ensure = 'installed', +) { package { [ 'links', 'elinks', @@ -6,6 +8,6 @@ class nodo::utils::web::console { 'w3m', 'newsbeuter', ]: - ensure => installed, + ensure => $ensure, } } diff --git a/manifests/utils/web/gui.pp b/manifests/utils/web/gui.pp index bbf9e61..64b4ef6 100644 --- a/manifests/utils/web/gui.pp +++ b/manifests/utils/web/gui.pp @@ -1,4 +1,6 @@ -class nodo::utils::web::gui { +class nodo::utils::web::gui ( + $ensure = 'installed', +) { # Web: GUI package { [ 'firefox-esr', @@ -23,12 +25,15 @@ class nodo::utils::web::gui { #'nicotine', #'sshfs', ]: - ensure => installed, + ensure => $ensure, } # Browser alternative file { "/etc/alternatives/x-www-browser": - ensure => "/usr/bin/firefox-esr", + ensure => $ensure ? { + 'present','installed' => "/usr/bin/firefox-esr", + default => undef, + }, owner => root, group => root, require => Package['firefox-esr'], @@ -36,7 +41,10 @@ class nodo::utils::web::gui { # Browser alternative: manpage file { "/etc/alternatives/x-www-browser.1.gz": - ensure => "/usr/share/man/man1/firefox-esr.1.gz", + ensure => $ensure ? { + 'present','installed' => "/usr/share/man/man1/firefox-esr.1.gz", + default => undef, + }, owner => root, group => root, require => Package['firefox-esr'], -- cgit v1.2.3