From 2390cad785cc63d59eade9c819675e8699c58ef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 10 Aug 2016 23:21:16 +0200 Subject: Use package git repo --- modules/pacman | 1 + modules/pacman/manifests/config.pp | 77 ------------------------------------- modules/pacman/manifests/init.pp | 55 -------------------------- modules/pacman/manifests/install.pp | 13 ------- modules/pacman/manifests/params.pp | 41 -------------------- modules/pacman/manifests/repo.pp | 21 ---------- 6 files changed, 1 insertion(+), 207 deletions(-) create mode 160000 modules/pacman delete mode 100644 modules/pacman/manifests/config.pp delete mode 100644 modules/pacman/manifests/init.pp delete mode 100644 modules/pacman/manifests/install.pp delete mode 100644 modules/pacman/manifests/params.pp delete mode 100644 modules/pacman/manifests/repo.pp (limited to 'modules/pacman/manifests') diff --git a/modules/pacman b/modules/pacman new file mode 160000 index 0000000..1b42bd1 --- /dev/null +++ b/modules/pacman @@ -0,0 +1 @@ +Subproject commit 1b42bd156fd35c7736e155e3a8c456969a274ffa diff --git a/modules/pacman/manifests/config.pp b/modules/pacman/manifests/config.pp deleted file mode 100644 index 9bd22be..0000000 --- a/modules/pacman/manifests/config.pp +++ /dev/null @@ -1,77 +0,0 @@ -# Class: pacman::config -# -# This module manages pacman config file -# -# Parameters: -# $config = '/etc/pacman.conf' -# -# Actions: -# with the use of concat it will build a pacman config file -# which is extendable with the class pacman::repo -# -# Requires: see Modulefile -# -# Sample Usage: -# -class pacman::config ( - $config = $pacman::config, - # pacman config options - $rootdir = $pacman::rootdir, - $dbpath = $pacman::dbpath, - $cachedir = $pacman::cachedir, - $logfile = $pacman::logfile, - $gpgdir = $pacman::gpgdir, - $holdpkg = $pacman::holdpkg, - $xfercommand = $pacman::xfercommand, - $cleanmethod = $pacman::cleanmethod, - $usedelta = $pacman::usedelta, - $architecture = $pacman::architecture, - # pacman package options - $ignorepkg = $pacman::ignorepkg, - $noupgrade = $pacman::noupgrade, - $noextract = $pacman::noextract, - # pacman misc options - $usesyslog = $pacman::usesyslog, - $color = $pacman::color, - $totaldownload = $pacman::totaldownload, - $checkspace = $pacman::checkspace, - $verbosepkglist = $pacman::verbosepkglist, - # pacman sec options - $mainsiglevel = $pacman::mainsiglevel, - $localfilesiglevel = $pacman::localfilesiglevel, - $remotefilesiglevel = $pacman::remotefilesiglevel,) inherits pacman { - concat { $config: - ensure_newline => true, - owner => 0, - group => 0, - mode => '0644', - } - - concat::fragment { 'main': - target => $config, - content => template('pacman/pacman.conf.main.erb'), - order => 00 - } - - pacman::repo { 'core': - include => '/etc/pacman.d/mirrorlist', - order => 10, - } - - pacman::repo { 'extra': - include => '/etc/pacman.d/mirrorlist', - order => 11, - } - - pacman::repo { 'community': - include => '/etc/pacman.d/mirrorlist', - order => 12, - } - - concat::fragment { 'custom': - target => $config, - content => template('pacman/pacman.conf.customrepo.erb'), - order => 15 - } - -} diff --git a/modules/pacman/manifests/init.pp b/modules/pacman/manifests/init.pp deleted file mode 100644 index 731f371..0000000 --- a/modules/pacman/manifests/init.pp +++ /dev/null @@ -1,55 +0,0 @@ -# Class: pacman -# -# This module manages pacman -# -# Parameters: -# $config = '/etc/pacman.conf' -# $config_template = 'pacman/pacman.conf.archlinux.erb' -# $package_name = ['pacman'] -# -# Actions: -# -# Requires: see Modulefile -# -# Sample Usage: -# -class pacman ( - $config = $pacman::params::config, - $package_ensure = $pacman::params::package_ensure, - $package_name = $pacman::params::package_name, - # pacman config options - $rootdir = $pacman::params::rootdir, - $dbpath = $pacman::params::dbpath, - $cachedir = $pacman::params::cachedir, - $logfile = $pacman::params::logfile, - $gpgdir = $pacman::params::gpgdir, - $holdpkg = $pacman::params::holdpkg, - $xfercommand = $pacman::params::xfercommand, - $cleanmethod = $pacman::params::cleanmethod, - $usedelta = $pacman::params::usedelta, - $architecture = $pacman::params::architecture, - # pacman package options - $ignorepkg = $pacman::params::ignorepkg, - $noupgrade = $pacman::params::noupgrade, - $noextract = $pacman::params::noextract, - # pacman misc options - $usesyslog = $pacman::params::usesyslog, - $color = $pacman::params::color, - $totaldownload = $pacman::params::totaldownload, - $checkspace = $pacman::params::checkspace, - $verbosepkglist = $pacman::params::verbosepkglist, - # pacman sec options - $mainsiglevel = $pacman::params::mainsiglevel, - $localfilesiglevel = $pacman::params::localfilesiglevel, - $remotefilesiglevel = $pacman::params::remotefilesiglevel,) inherits -pacman::params { - include '::pacman::install' - include '::pacman::config' - - anchor { 'pacman::begin': } - - anchor { 'pacman::end': } - - Anchor['pacman::begin'] -> Class['::pacman::install'] -> Class['::pacman::config' - ] -> Anchor['pacman::end'] -} diff --git a/modules/pacman/manifests/install.pp b/modules/pacman/manifests/install.pp deleted file mode 100644 index 02b3128..0000000 --- a/modules/pacman/manifests/install.pp +++ /dev/null @@ -1,13 +0,0 @@ -# Class: pacman::install -# -# This class ensures pacman is installed -# -class pacman::install ( - $package_ensure = $pacman::package_ensure, - $package_name = $pacman::package_name,) inherits pacman { - package { 'pacman': - ensure => $package_ensure, - name => $package_name, - } - -} diff --git a/modules/pacman/manifests/params.pp b/modules/pacman/manifests/params.pp deleted file mode 100644 index b8b9e1c..0000000 --- a/modules/pacman/manifests/params.pp +++ /dev/null @@ -1,41 +0,0 @@ -# Class: pacman::params -# -class pacman::params { - case $::osfamily { - 'Archlinux' : { - $package_ensure = 'present' - $package_name = 'pacman' - $config = '/etc/pacman.conf' - # pacman config options - $rootdir = '/' - $dbpath = '/var/lib/pacman' - $cachedir = '/var/cache/pacman/pkg' - $logfile = '/var/log/pacman.log' - $gpgdir = '/etc/pacman.d/gnupg/' - $holdpkg = 'pacman glibc' - $xfercommand = '/usr/bin/curl -C - -f %u > %o' - $cleanmethod = 'KeepInstalled' - $usedelta = '0.7' - $architecture = 'auto' - # pacman package options - $ignorepkg = undef - $noupgrade = undef - $noextract = undef - # pacman misc options - $usesyslog = false - $color = false - $totaldownload = false - $checkspace = true - $verbosepkglist = false - # pacman sec options - $mainsiglevel = 'Required DatabaseOptional' - $localfilesiglevel = 'Optional' - $remotefilesiglevel = 'Required' - } - - default : { - fail("The ${module_name} module is not supported - on an ${::osfamily} based system.") - } - } -} diff --git a/modules/pacman/manifests/repo.pp b/modules/pacman/manifests/repo.pp deleted file mode 100644 index 02dc4ec..0000000 --- a/modules/pacman/manifests/repo.pp +++ /dev/null @@ -1,21 +0,0 @@ -# This resource manages an individual repo's that applies to the file defined in -# $target. See README.md for more details. -# always order from 100 and increase. -define pacman::repo ( - $server = undef, - $include = undef, - $description = undef, - $siglevel = undef, - $order = '100', - # Needed for testing primarily, support for multiple files is not really - # working. - $target = $pacman::config::config) { - # Create a rule fragment - $fragname = "repo_${name}" - - concat::fragment { $fragname: - target => $target, - content => template('pacman/pacman.conf.repo.erb'), - order => $order, - } -} -- cgit v1.2.3