Skip to content

Commit

Permalink
Merge pull request #186 from treydock/ubuntu-2004
Browse files Browse the repository at this point in the history
Support Ubuntu 20.04, bump dependency requirements
  • Loading branch information
treydock authored Mar 7, 2021
2 parents 85cf51e + ca96534 commit 58bc955
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ fixtures:
ref: 4.25.0
mysql:
repo: https://github.com/puppetlabs/puppetlabs-mysql.git
ref: v10.2.0
ref: v10.3.0
postgresql:
repo: https://github.com/puppetlabs/puppetlabs-postgresql.git
ref: v6.4.0
ref: v6.6.0
java:
repo: https://github.com/puppetlabs/puppetlabs-java.git
ref: v5.0.0
ref: v6.3.0
java_ks:
repo: https://github.com/puppetlabs/puppetlabs-java_ks.git
ref: 1.4.1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- "debian-9"
- "debian-10"
- "ubuntu-1804"
- "ubuntu-2004"
puppet:
- "puppet6"
- "puppet7"
Expand Down
4 changes: 4 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- debian-9
- debian-10
- ubuntu-1804
- ubuntu-2004
puppet:
- puppet6
- puppet7
Expand Down Expand Up @@ -64,3 +65,6 @@ spec/acceptance/nodesets/ubuntu-1604.yml:
spec/acceptance/nodesets/ubuntu-1804.yml:
packages:
- iproute2
spec/acceptance/nodesets/ubuntu-2004.yml:
packages:
- iproute2
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,9 @@ keycloak_required_action { 'webauthn-register on master':

This module has been tested on:

* CentOS 7 x86_64
* RedHat 7 x86_64
* RedHat/CentOS 7 x86_64
* RedHat/CentOS 8 x86_64
* Debian 9 x86_64
* Debian 10 x86_64
* Ubuntu 18.04 x86_64
* Ubuntu 20.04 x86_64
3 changes: 2 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@
}
}
'Debian': {
if $facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'], '10') >= 0 {
if ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'], '10') >= 0) or
($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '20.04') >= 0) {
$mysql_datasource_class = pick($datasource_xa_class, 'org.mariadb.jdbc.MariaDbDataSource')
$mysql_jar_source = '/usr/share/java/mariadb-java-client.jar'
} else {
Expand Down
13 changes: 7 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@
},
{
"name": "puppetlabs/mysql",
"version_requirement": ">= 10.2.0 <11.0.0"
"version_requirement": ">= 10.3.0 <12.0.0"
},
{
"name": "puppetlabs/postgresql",
"version_requirement": ">= 6.4.0 <7.0.0"
"version_requirement": ">= 6.6.0 <8.0.0"
},
{
"name": "puppetlabs/java",
"version_requirement": ">= 5.0.0 <7.0.0"
"version_requirement": ">= 6.3.0 <8.0.0"
},
{
"name": "puppetlabs/java_ks",
"version_requirement": ">= 1.0.0 <4.0.0"
"version_requirement": ">= 1.0.0 <5.0.0"
},
{
"name": "puppetlabs/augeas_core",
"version_requirement": ">= 1.0.0 <4.0.0"
"version_requirement": ">= 1.0.0 <2.0.0"
},
{
"name": "puppetlabs/yumrepo_core",
Expand Down Expand Up @@ -77,7 +77,8 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"18.04"
"18.04",
"20.04"
]
}
],
Expand Down
25 changes: 25 additions & 0 deletions spec/acceptance/nodesets/ubuntu-2004.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
HOSTS:
ubuntu2004:
roles:
- agent
platform: ubuntu-20.04-amd64
hypervisor : docker
image: ubuntu:20.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- "rm -f /etc/dpkg/dpkg.cfg.d/excludes"
- 'apt-get install -y wget net-tools locales apt-transport-https ca-certificates iproute2'
- 'locale-gen en_US.UTF-8'
docker_env:
- LANG=en_US.UTF-8
- LANGUAGE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
docker_container_name: 'keycloak-ubuntu2004'
CONFIG:
log_level: debug
type: foss
ssh:
password: root
auth_methods: ["password"]

14 changes: 7 additions & 7 deletions spec/spec_helper_acceptance_setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
data_hash: yaml_data
hierarchy:
- name: 'os family major release'
path: "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
path: "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
- name: "Common"
path: "common.yaml"
EOS
# Hack until released: https://github.com/puppetlabs/puppetlabs-mysql/pull/1264
debian10_yaml = <<-EOS
# TODO: Use until released https://github.com/puppetlabs/puppetlabs-mysql/pull/1373
ubuntu2004_yaml = <<-EOS
mysql::bindings::java_package_name: libmariadb-java
EOS
centos7_yaml = <<-EOS
Expand All @@ -43,7 +43,7 @@
create_remote_file(hosts, '/etc/puppetlabs/puppet/hiera.yaml', hiera_yaml)
on hosts, 'mkdir -p /etc/puppetlabs/puppet/data'
create_remote_file(hosts, '/etc/puppetlabs/puppet/data/common.yaml', common_yaml)
on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/Debian'
create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/Debian/10.yaml', debian10_yaml)
on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/RedHat'
create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/RedHat/7.yaml', centos7_yaml)
on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/Ubuntu'
create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/Ubuntu/20.04.yaml', ubuntu2004_yaml)
on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/CentOS'
create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/CentOS/7.yaml', centos7_yaml)

0 comments on commit 58bc955

Please sign in to comment.