Project

General

Profile

« Previous | Next » 

Revision 1ab13bfe

Added by Michael Moll almost 6 years ago

Support Ubuntu/bionic, drop Debian 7 & Fedora 25 (#605)

View differences:

.travis.yml
# https://github.com/theforeman/foreman-installer-modulesync
rvm:
- 2.1.9
- 2.2.6
- 2.3.0
- 2.4.1
env:
......
include:
- rvm: 2.4.1
env: PUPPET_VERSION=5.0
- rvm: 2.5.1
env: PUPPET_VERSION=5.0
# Acceptance tests
- rvm: 2.3.1
dist: trusty
manifests/params.pp
case $::osfamily {
'Debian' : {
$agent_restart_command = "/usr/sbin/service ${service_name} reload"
if (
($::operatingsystem == 'Debian') and (versioncmp($::operatingsystemrelease, '8.0') >= 0) or
($::operatingsystem == 'Ubuntu') and (versioncmp($::operatingsystemrelease, '15.04') >= 0)
) {
if ($::operatingsystem == 'Debian' or $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '15.04') >= 0) {
$unavailable_runmodes = []
} else {
$unavailable_runmodes = ['systemd.timer']
metadata.json
{
"operatingsystem": "Fedora",
"operatingsystemrelease": [
"25",
"26"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"7",
"8",
"9"
]
......
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04",
"16.04"
"16.04",
"18.04"
]
},
{
spec/classes/puppet_agent_service_spec.rb
should contain_class('puppet::agent::service::cron').with(:enabled => false)
end
case os
when /\Adebian-(8|9)/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-16/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
it do
should contain_class('puppet::agent::service::systemd').with(:enabled => false)
should contain_service('puppet-run.timer').with(:ensure => :stopped)
......
it do
should raise_error(Puppet::Error, /Runmode of cron not supported on #{facts[:kernel]} operating systems!/)
end
when /\Adebian-(8|9)/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-16/
when /\Adebian-/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-(16|18)/
it do
should contain_class('puppet::agent::service::cron').with(:enabled => true)
should contain_class('puppet::agent::service::daemon').with(:enabled => false)
......
"class {'puppet': agent => true, runmode => 'systemd.timer'}"
end
case os
when /\Adebian-(8|9)/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-16/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
it do
should contain_class('puppet::agent::service::daemon').with(:enabled => false)
should contain_class('puppet::agent::service::cron').with(:enabled => false)
......
should contain_class('puppet::agent::service::cron').with(:enabled => false)
end
case os
when /\Adebian-(8|9)/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-16/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
it do
should contain_class('puppet::agent::service::systemd').with(:enabled => false)
should contain_service('puppet-run.timer').with(:ensure => :stopped)
spec/classes/puppet_agent_service_systemd_spec.rb
end
case os
when /\Adebian-(8|9)/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-16/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
it 'should disable systemd timer' do
should contain_class('puppet::agent::service::systemd').with({
'enabled' => false,
......
end
case os
when /\Adebian-(8|9)/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-16/, /\Aarchlinux-/
when /\Adebian-/, /\A(redhat|centos|scientific)-7/, /\Afedora-/, /\Aubuntu-(16|18)/, /\Aarchlinux-/
it 'should enable systemd timer' do
should contain_class('puppet::agent::service::systemd').with_enabled(true)

Also available in: Unified diff