Skip to content

Commit

Permalink
Merge a176e07 into efe4644
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jul 25, 2020
2 parents efe4644 + a176e07 commit 36ca3fa
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 61 deletions.
3 changes: 3 additions & 0 deletions .github/SECURITY.md
@@ -0,0 +1,3 @@
# Vox Pupuli Security Policy

Our vulnerabilities reporting process is at https://voxpupuli.org/security/
2 changes: 1 addition & 1 deletion .msync.yml
@@ -1 +1 @@
modulesync_config_version: '2.12.0'
modulesync_config_version: '3.0.0'
3 changes: 3 additions & 0 deletions .rubocop.yml
Expand Up @@ -528,6 +528,9 @@ RSpec/RepeatedDescription:
RSpec/NestedGroups:
Enabled: False

RSpec/MultipleExpectations:
Enabled: false

# this is broken on ruby1.9
Layout/IndentHeredoc:
Enabled: False
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
@@ -1,4 +1,5 @@
---
os: linux
dist: bionic
language: ruby
cache: bundler
Expand All @@ -7,7 +8,7 @@ before_install:
- bundle --version
script:
- 'bundle exec rake $CHECK'
matrix:
jobs:
fast_finish: true
include:
- rvm: 2.4.4
Expand Down Expand Up @@ -36,7 +37,7 @@ notifications:
- "chat.freenode.org#voxpupuli-notifications"
deploy:
provider: puppetforge
user: puppet
username: puppet
password:
secure: "gdyAdrzLWQymKieoE9tB0o3y8Dx+EH0mb6lCK6sgZe3mKGn/gCOEYtiJs2pUNTcHBYGvnSwKu9ajrLBmp4IPJxV2Uc/Wtoj2Dlcb4dV7VHRSA+N/ZYSMNirO/mqwR6ZW94P0mbrwSpYWkx2lxlC9hLvkHdTWBzWajC3i6Khd7h0="
on:
Expand Down
28 changes: 4 additions & 24 deletions Gemfile
Expand Up @@ -11,9 +11,9 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'voxpupuli-test', '>= 1.0.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'voxpupuli-test', '~> 2.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
end

group :development do
Expand All @@ -24,27 +24,7 @@ group :development do
end

group :system_tests do
gem 'winrm', :require => false
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
else
gem 'beaker', '>= 4.2.0', :require => false
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-hostgenerator', '>= 1.1.22', :require => false
gem 'beaker-docker', :require => false
gem 'beaker-puppet', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'rbnacl', '>= 4', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', :require => false
gem 'ed25519', :require => false
gem 'voxpupuli-acceptance', :require => false
end

group :release do
Expand Down
5 changes: 2 additions & 3 deletions manifests/exports.pp
Expand Up @@ -14,12 +14,11 @@
#
# Copyright 2012 Puppet Labs, unless otherwise noted
#
class mrepo::exports($clients) {

class mrepo::exports ($clients) {
$file_path = '/usr/local/sbin/export-mrepo'

file { $file_path:
ensure => present,
ensure => file,
source => 'puppet:///modules/mrepo/export-mrepo',
owner => '0',
group => '0',
Expand Down
3 changes: 0 additions & 3 deletions manifests/init.pp
Expand Up @@ -147,7 +147,6 @@
Boolean $service_enable = $mrepo::params::service_enable,
Boolean $service_manage = $mrepo::params::service_manage,
) inherits mrepo::params {

if $rhn {
assert_type(String[1], $rhn_username)
assert_type(String[1], $rhn_password)
Expand Down Expand Up @@ -182,6 +181,4 @@
Class['mrepo::package'] -> Class['mrepo::rhn']
Class['mrepo::package'] -> Class['mrepo::selinux']
Class['mrepo::webservice'] -> Class['mrepo::selinux']

}

10 changes: 5 additions & 5 deletions manifests/iso.pp
Expand Up @@ -7,16 +7,16 @@
# file is actually found. This parameter gets concatenated with the filename
# from title param, which then forms the whole URL to the ISO file.
# @param repo Title of the mrepo::repo resources the ISO file belongs to
define mrepo::iso($source_url, $repo) {
define mrepo::iso ($source_url, $repo) {
include mrepo

$target_file = "${mrepo::src_root}/iso/${name}"

ensure_resource('file', "${mrepo::src_root}/iso", {
'ensure' => 'directory',
'owner' => $mrepo::user,
'group' => $mrepo::group,
'mode' => '0644',
'ensure' => 'directory',
'owner' => $mrepo::user,
'group' => $mrepo::group,
'mode' => '0644',
})

archive { $target_file:
Expand Down
3 changes: 1 addition & 2 deletions manifests/package.pp
Expand Up @@ -17,7 +17,6 @@
# Copyright 2011 Puppet Labs, unless otherwise noted
#
class mrepo::package {

$user = $mrepo::user
$group = $mrepo::group
$source = $mrepo::source
Expand Down Expand Up @@ -65,7 +64,7 @@
$createrepo_options = $mrepo::createrepo_options

file { '/etc/mrepo.conf':
ensure => present,
ensure => file,
owner => $user,
group => $group,
mode => '0640',
Expand Down
8 changes: 3 additions & 5 deletions manifests/repo.pp
Expand Up @@ -153,9 +153,8 @@

case $ensure {
'present': {

file { "/etc/mrepo.conf.d/${name}.conf":
ensure => present,
ensure => file,
owner => $user,
group => $group,
content => template('mrepo/repo.conf.erb'),
Expand All @@ -174,7 +173,7 @@
exec { "Generate mrepo repo ${name}":
command => "mrepo -g ${name}",
cwd => $src_root,
path => [ '/usr/bin', '/bin' ],
path => ['/usr/bin', '/bin'],
user => $user,
group => $group,
creates => $www_root_subdir,
Expand All @@ -196,7 +195,7 @@
exec { "Synchronize repo ${name}":
command => $repo_command,
cwd => $src_root,
path => [ '/usr/bin', '/bin' ],
path => ['/usr/bin', '/bin'],
user => $user,
group => $group,
timeout => $sync_timeout,
Expand Down Expand Up @@ -286,7 +285,6 @@
# don't do anything for 'std'
}
}

}
'absent': {
exec { "Unmount any mirrored ISOs for ${name}":
Expand Down
4 changes: 2 additions & 2 deletions manifests/repo/ncc.pp
Expand Up @@ -48,7 +48,7 @@
$src_root_subdir = "${mrepo::src_root}/${real_name}"

file { "${src_root_subdir}/deviceid":
ensure => present,
ensure => file,
owner => $user,
group => $group,
mode => '0640',
Expand All @@ -57,7 +57,7 @@
}

file { "${src_root_subdir}/secret":
ensure => present,
ensure => file,
owner => $user,
group => $group,
mode => '0640',
Expand Down
4 changes: 2 additions & 2 deletions manifests/repo/rhn.pp
Expand Up @@ -64,7 +64,7 @@
if $ensure == 'present' and $gen_env {
exec { "Generate systemid ${name} - ${arch}":
command => $sysid_command,
path => [ '/bin', '/usr/bin' ],
path => ['/bin', '/usr/bin'],
user => $user,
group => $group,
creates => "${src_root}/${name}/systemid",
Expand All @@ -80,7 +80,7 @@
elsif $ensure == 'present' {
exec { "Generate systemid ${name} - ${arch}":
command => $sysid_command,
path => [ '/bin', '/usr/bin' ],
path => ['/bin', '/usr/bin'],
user => $user,
group => $group,
creates => "${src_root}/${name}/systemid",
Expand Down
1 change: 0 additions & 1 deletion manifests/repos.pp
@@ -1,7 +1,6 @@
class mrepo::repos (
Hash $resources = {}
) {

create_resources('mrepo::repo',$resources)

Class['mrepo::selinux']
Expand Down
5 changes: 1 addition & 4 deletions manifests/rhn.pp
Expand Up @@ -19,20 +19,17 @@
# Copyright 2011 Puppet Labs, unless otherwise noted
#
class mrepo::rhn {

$group = $mrepo::group
$rhn = $mrepo::rhn
$rhn_config = $mrepo::rhn_config

if $rhn == true {

package { 'pyOpenSSL':
ensure => present,
}

# CentOS does not have redhat network specific configuration files by default
if $facts['os']['name'] == 'CentOS' or $rhn_config == true {

file { '/etc/sysconfig/rhn':
ensure => 'file',
owner => 'root',
Expand Down Expand Up @@ -75,7 +72,7 @@
mode => '0755',
}

file {'/usr/share/rhn/RHNS-CA-CERT':
file { '/usr/share/rhn/RHNS-CA-CERT':
ensure => link,
target => '/usr/share/mrepo/rhn/RHNS-CA-CERT',
}
Expand Down
5 changes: 2 additions & 3 deletions manifests/selinux.pp
Expand Up @@ -19,15 +19,14 @@
# Copyright 2011 Puppet Labs, unless otherwise noted
#
class mrepo::selinux {

$src_root = $mrepo::src_root
$www_root = $mrepo::www_root
$context = $mrepo::selinux_context

if $mrepo::use_selinux {
exec { "Apply httpd context to mrepo ${src_root}":
command => "chcon -hR ${context} ${src_root}",
path => [ '/usr/bin', '/bin' ],
path => ['/usr/bin', '/bin'],
user => 'root',
group => 'root',
unless => "test `ls -dZ ${src_root} | awk '{print \$4}'` = '${context}'",
Expand All @@ -37,7 +36,7 @@

exec { "Apply httpd context to mrepo ${www_root}":
command => "chcon -hR ${context} ${www_root}",
path => [ '/usr/bin', '/bin' ],
path => ['/usr/bin', '/bin'],
user => 'root',
group => 'root',
unless => "test `ls -dZ ${www_root} | awk '{print \$4}'` = '${context}'",
Expand Down
2 changes: 0 additions & 2 deletions manifests/service.pp
Expand Up @@ -12,7 +12,6 @@
# https://github.com/PascalBourdier
#
class mrepo::service {

include mrepo

$source = $mrepo::source
Expand All @@ -24,5 +23,4 @@
enable => $service_enable,
}
}

}
4 changes: 2 additions & 2 deletions manifests/webservice.pp
Expand Up @@ -12,9 +12,9 @@
#
# Copyright 2011 Puppet Labs, unless otherwise noted
#
class mrepo::webservice(
class mrepo::webservice (
Enum['present', 'absent'] $ensure = 'present'
){
) {
include mrepo

$user = $mrepo::user
Expand Down

0 comments on commit 36ca3fa

Please sign in to comment.