Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RHEL/CentOS 8 and Debian 10 #235

Merged
merged 2 commits into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
.travis.yml:
secure: "xwp69Nk5akckY84I/UecQOJx1guhKFscwR16AURDw/A2oO6uY2T8iHqWN+i0jrQ4rB+EZK76dTvDZiNIOBByPc0GC4Hn53L2wy0uEz41Sd/Ys4gZviIFjY81y2jEeFa2MFPAI5KWCBFk4vPOoT8raYpkBA37ux6kvm2bemmqqSQ="
docker_sets:
- set: ubuntu1804-64
- set: ubuntu1604-64
- set: centos7-64
- set: centos6-64
- set: debian9-64
- set: centos7-64
- set: centos8-64
- set: debian8-64
- set: debian9-64
- set: debian10-64
- set: ubuntu1604-64
- set: ubuntu1804-64
36 changes: 26 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,35 @@ matrix:
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
Expand All @@ -64,11 +64,27 @@ matrix:
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian10-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian8-64 BEAKER_HYPERVISOR=docker CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
- rvm: 2.5.3
bundler_args: --without development release
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@

case $facts['os']['family'] {
'RedHat': {
if $facts['os']['release']['major'] == '7' {
if $facts['os']['release']['major'] =~ /(7|8)/ {
$use_systemd_service_file = true
} else {
$use_systemd_service_file = false
Expand Down
6 changes: 5 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
}
'RedHat': {
$dhcp_dir = '/etc/dhcp'
$packagename = 'dhcp'
if $facts['os']['release']['major'] == '8' {
$packagename = 'dhcp-server'
} else {
$packagename = 'dhcp'
}
$servicename = 'dhcpd'
$package_provider = undef
$dhcpd_binary = '/usr/sbin/dhcpd'
Expand Down
25 changes: 14 additions & 11 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,39 @@
}
],
"operatingsystem_support": [
{
"operatingsystem": "Archlinux"
},
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"6",
"7"
"7",
"8"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"6",
"7"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"16.04",
"18.04"
"7",
"8"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"8",
"9"
"9",
"10"
]
},
{
"operatingsystem": "Archlinux"
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"16.04",
"18.04"
]
}
],
"requirements": [
Expand Down
6 changes: 4 additions & 2 deletions spec/defines/dhcp_class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
let(:header) { ['#################################', "# Custom class #{title}", '#################################'] }
let(:facts) do
{
osfamily: 'RedHat',
os: { family: 'RedHat' }
os: {
family: 'RedHat',
release: { major: '8' }
}
}
end

Expand Down
6 changes: 4 additions & 2 deletions spec/defines/host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
let(:facts) do
{
concat_basedir: '/dne',
osfamily: 'RedHat',
os: { family: 'RedHat' }
os: {
family: 'RedHat',
release: { major: '8' }
}

}
end
Expand Down
6 changes: 4 additions & 2 deletions spec/defines/ignoredsubnet_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
let(:facts) do
{
concat_basedir: '/dne',
osfamily: 'RedHat',
os: { family: 'RedHat' }
os: {
family: 'RedHat',
release: { major: '8' }
}
}
end
let :default_params do
Expand Down
6 changes: 4 additions & 2 deletions spec/defines/pool6_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
let(:facts) do
{
concat_basedir: '/dne',
osfamily: 'RedHat',
os: { family: 'RedHat' }
os: {
family: 'RedHat',
release: { major: '8' }
}
}
end
let :params do
Expand Down
6 changes: 4 additions & 2 deletions spec/defines/pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
let(:facts) do
{
concat_basedir: '/dne',
osfamily: 'RedHat',
os: { family: 'RedHat' }
os: {
family: 'RedHat',
release: { major: '8' }
}
}
end
let :params do
Expand Down