Commit 16479efd authored by Michael Thomas's avatar Michael Thomas
Browse files

Convert package arrays to a hash to allow better hiera merge behavior

parent 254bce0b
This diff is collapsed.
......@@ -4,44 +4,41 @@ ligoprofile::cvmfs::cvmfs_version: 'installed'
ligoprofile::cvmfs::config_osg_version: 'installed'
ligoprofile::software::common::packages:
- name: 'gettext-devel'
- name: 'telnet'
- name: 'emacs'
- name: 'nss'
- name: 'nss-devel'
- name: 'nss-sysinit'
- name: 'nss-tools'
- name: 'sos'
- name: 'rpmdevtools'
- name: 'tcsh'
- name: 'vim-enhanced'
'gettext-devel':
'telnet':
'emacs':
'nss':
'nss-devel':
'nss-sysinit':
'nss-tools':
'rpmdevtools':
ligoprofile::software::user::packages:
- name: 'fftw'
- name: 'fftw-devel'
- name: 'fftw-libs'
- name: 'fftw-libs-double'
- name: 'fftw-libs-long'
- name: 'fftw-libs-single'
- name: 'fftw-static'
- name: 'flatpak'
- name: 'flatpak-libs'
- name: 'git-lfs'
- name: 'cmake3'
- name: 'cmake3-data'
- name: 'epel-rpm-macros'
- name: 'python3-root'
- name: 'python3-configobj'
- name: 'python3-h5py'
- name: 'python3-matplotlib'
- name: 'python3-matplotlib-data'
- name: 'python3-matplotlib-data-fonts'
- name: 'python3-matplotlib-tk'
- name: 'python3-scipy'
- name: 'scitokens-cpp'
- name: 'osg-ca-certs'
- name: 'xxhash-libs'
- name: 'ipmctl'
'fftw':
'fftw-devel':
'fftw-libs':
'fftw-libs-double':
'fftw-libs-long':
'fftw-libs-single':
'fftw-static':
'flatpak':
'flatpak-libs':
'git-lfs':
'cmake3':
'cmake3-data':
'epel-rpm-macros':
'python3-root':
'python3-configobj':
'python3-h5py':
'python3-matplotlib':
'python3-matplotlib-data':
'python3-matplotlib-data-fonts':
'python3-matplotlib-tk':
'python3-scipy':
'scitokens-cpp':
'osg-ca-certs':
'xxhash-libs':
'ipmctl':
# The target attribute is currently ignored. See https://tickets.puppetlabs.com/browse/MODULES-7422
ligoprofile::yum::repos:
......
---
ligoprofile::software::common::packages:
- name: 'epel-release'
- name: 'dovecot'
version: 'absent'
- name: 'redhat-lsb'
- name: 'tcllib'
- name: 'ipmitool'
- name: 'OpenIPMI'
- name: 'gdisk'
- name: 'iperf3'
- name: 'hdparm'
- name: 'bonnie++'
- name: 'mcelog'
- name: 'pbzip2'
- name: 'tzdata'
version: 'latest'
- name: 'tzdata-java'
version: 'latest'
- name: 'kmod-libs'
- name: 'extundelete'
- name: 'parallel'
- name: 'nfs-utils'
- name: 'smartmontools'
- name: 'dhclient'
- name: 'libcgroup-tools'
- name: 'pigz'
- name: 'strace'
- name: 'zsh'
- name: 'rsync'
- name: 'tar'
- name: 'traceroute'
- name: 'iotop'
- name: 'ioping'
- name: 'iftop'
- name: 'mlocate'
- name: 'tmux'
- name: 'csh'
- name: 'ksh'
- name: 'ndctl'
- name: 'par2cmdline'
- name: 'zstd'
- name: 'lshw'
- name: 'fio'
- name: 'tcpdump'
- name: 'sg3_utils'
- name: 'atop'
- name: 'nvme-cli'
'epel-release':
'dovecot':
ensure: 'absent'
'redhat-lsb':
'tcllib':
'ipmitool':
'OpenIPMI':
'gdisk':
'iperf3':
'hdparm':
'bonnie++':
'mcelog':
'pbzip2':
'sos':
'vim-enhanced':
'tcsh':
'tzdata':
ensure: 'latest'
'tzdata-java':
ensure: 'latest'
'kmod-libs':
'extundelete':
'parallel':
'nfs-utils':
'smartmontools':
'dhclient':
'libcgroup-tools':
'pigz':
'strace':
'zsh':
'rsync':
'tar':
'traceroute':
'iotop':
'ioping':
'iftop':
'mlocate':
'tmux':
'csh':
'ksh':
'ndctl':
'par2cmdline':
'zstd':
'lshw':
'fio':
'tcpdump':
'sg3_utils':
'atop':
'nvme-cli':
ligoprofile::software::user::packages:
- name: 'sqlite'
- name: 'nss-softokn'
- name: 'nss-softokn-devel'
- name: 'nss-softokn-freebl'
- name: 'nss-softokn-freebl-devel'
- name: 'nss-util'
- name: 'nss-util-devel'
- name: 'duc'
- name: 'matlab-mcr-r2015a'
- name: 'root-physics'
- name: 'clang'
- name: 'llvm'
- name: 'gsi-openssh'
- name: 'gsi-openssh-clients'
- name: 'globus-ftp-client'
- name: 'container-selinux'
- name: 'containers-common'
- name: 'intltool'
- name: 'myproxy'
- name: 'myproxy-libs'
- name: 'libgs'
- name: 'libuv'
- name: 'pylint'
- name: 'root'
- name: 'SDL'
- name: 'SDL-devel'
- name: 'kpatch'
- name: 'fribidi'
- name: 'fribidi-devel'
- name: 'openslp'
- name: 'singularity'
'sqlite':
'nss-softokn':
'nss-softokn-devel':
'nss-softokn-freebl':
'nss-softokn-freebl-devel':
'nss-util':
'nss-util-devel':
'duc':
'matlab-mcr-r2015a':
'root-physics':
'clang':
'llvm':
'gsi-openssh':
'gsi-openssh-clients':
'globus-ftp-client':
'container-selinux':
'containers-common':
'intltool':
'myproxy':
'myproxy-libs':
'libgs':
'libuv':
'pylint':
'root':
'SDL':
'SDL-devel':
'kpatch':
'fribidi':
'fribidi-devel':
'openslp':
'singularity':
......@@ -7,9 +7,9 @@ lookup_options:
ligoprofile::mlocate::prunenames:
merge: 'unique'
ligoprofile::software::common::packages:
merge: 'unique'
merge: 'deep'
ligoprofile::software::user::packages:
merge: 'unique'
merge: 'deep'
ligoprofile::yum::config_options:
merge: 'hash'
ligoprofile::yum::repos:
......
This diff is collapsed.
......@@ -11,12 +11,19 @@ class ligoprofile::idprovider (
default_shell => lookup('ligoprofile::ldap::defaultshell'),
}
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7' {
$sssd_package_ensure = '1.16.5-10.el7_9.7'
} elsif $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8' {
$sssd_package_ensure = '2.3.0-9.el8'
} else {
$sssd_package_ensure = 'installed'
}
class {'::sssd':
sssd_package_ensure => '1.16.5-10.el7_9.7',
service_ensure => 'running',
mkhomedir => false,
extra_packages => [],
config => {
sssd_package_ensure => $sssd_package_ensure,
service_ensure => 'running',
mkhomedir => false,
extra_packages => [],
config => {
'sssd' => {
'domains' => 'default',
'config_file_version' => 2,
......
......@@ -36,11 +36,13 @@ class ligoprofile::software::common (
package {'watch': ensure => installed, }
}
default: {
lookup('ligoprofile::software::common::packages', {default_value => []} ).each |Struct[{name => String, Optional[version] => String}] $package| {
if $package['version'] {
package{"${package['name']}": ensure => "${package['version']}", }
lookup('ligoprofile::software::common::packages', {default_value => {}} ).each | String $name, Optional[Hash] $packageinfo | {
if $packageinfo {
package{"${name}":
* => $packageinfo,
}
} else {
package{"${package['name']}": ensure => 'present', }
package{"${name}": ensure => 'installed', }
}
}
package {'node_exporter': ensure => '1.1.2', }
......
......@@ -2,11 +2,13 @@ class ligoprofile::software::user (
) {
$localfilestore = lookup('ligoprofile::localfilestore')
lookup('ligoprofile::software::user::packages', {default_value => []} ).each |Struct[{name => String, Optional[version] => String}] $package| {
if $package['version'] {
package{"${package['name']}": ensure => "${package['version']}", }
lookup('ligoprofile::software::user::packages', {default_value => {}} ).each | String $name, Optional[Hash] $packageinfo | {
if $packageinfo {
package{"${name}":
* => $packageinfo,
}
} else {
package{"${package['name']}": ensure => 'present', }
package{"${name}": ensure => 'installed', }
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment