Skip to content

Commit

Permalink
More changes to fix Ubuntu 20.04 support
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Mar 7, 2021
1 parent bfda805 commit ca96534
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ spec/acceptance/nodesets/ubuntu-1604.yml:
spec/acceptance/nodesets/ubuntu-1804.yml:
packages:
- iproute2
spec/acceptance/nodesets/ubuntu-2004.yml:
packages:
- iproute2
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
2 changes: 1 addition & 1 deletion spec/acceptance/nodesets/ubuntu-2004.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ HOSTS:
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'
- '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
Expand Down
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 ca96534

Please sign in to comment.