diff --git a/README.md b/README.md index 3d55992..42a8143 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,9 @@ fetch git repositories. none +## Remarks +if you install r10k with the gem provider (default for RedHat family) +you need to ensure that you have ruby-devel (or ruby-dev) package installed. ## Contributing diff --git a/data/RedHat-family.yaml b/data/RedHat-family.yaml new file mode 100644 index 0000000..60693d9 --- /dev/null +++ b/data/RedHat-family.yaml @@ -0,0 +1,13 @@ +--- +# r10k setting for RedHat os family + +# there are no packages available, so we install from gem + +r10k::package_options: + provider: 'gem' + +r10k::configdir: '/etc/puppetlabs/r10k' +r10k::home: '/etc/puppetlabs/r10k' + +# since /usr/local/bin is not in path +r10k::r10k_command: '/usr/local/bin/r10k' diff --git a/manifests/init.pp b/manifests/init.pp index b0feaa3..2db7b9f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,6 +4,8 @@ # @param configdir # where the configfile should be put # defaults to '/etc/puppet' +# @param ensure_configdir +# set this to true to ensure the config direcory exists # @param cachedir # The 'cachedir' setting controls where cached content, such as mirrored Git # repositories, are stored on the local machine. This location should be @@ -89,6 +91,12 @@ } } + if $ensure_configdir { + file { $configdir: + ensure => 'directory', + } + } + ensure_packages($packages, { 'ensure' => $package_ensure } + $package_options) file { "${configdir}/r10k.yaml": diff --git a/metadata.json b/metadata.json index 42a8ee2..bf806a3 100644 --- a/metadata.json +++ b/metadata.json @@ -22,7 +22,26 @@ ] }, { - "operatingsystem": "Ubuntu" + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "20.04", + "22.04" + ] + }, + { + "operatingsystem": "RedHat", + "operatingsystemrelease": [ + "7", + "8", + "9" + ] + }, + { + "operatingsystem": "AlmaLinux", + "operatingsystemrelease": [ + "8", + "9" + ] } ], "requirements": [