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 Ubuntu 22.04 #178

Merged
merged 3 commits into from
Sep 20, 2022
Merged

Conversation

grant-veepshosting
Copy link
Contributor

Pull Request (PR) description

Add support for Ubuntu 22.04, compatible with 22.04 template.

This Pull Request (PR) fixes the following issues

Ubuntu LTS compatibility.

@smortex

This comment was marked as off-topic.

@smortex smortex added the needs-work not ready to merge just yet label Mar 28, 2022
@tarjei
Copy link

tarjei commented Jul 27, 2022

@smortex is the thing this is waiting for Puppet to have builds for 22.04?

@smortex smortex removed the needs-work not ready to merge just yet label Jul 27, 2022
@smortex
Copy link
Member

smortex commented Jul 27, 2022

@tarjei thanks for the heads up… Looks like I messed with my tabs when reviewing a bunch of PR including this one (was probably linking this to another PR that just updated metadata.json to add Ubuntu 22.04 support).

@smortex smortex added the enhancement New feature or request label Jul 27, 2022
Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably fine and can supposedly be merged as is. The next Puppet release should have Ubuntu 22.04 support, so maybe we can also wait for that release and add it to metadata.json so that the test suite run against it?

@brunoleon
Copy link
Contributor

Can you merge this now the 22.04 support is there ?

@smortex
Copy link
Member

smortex commented Sep 16, 2022

Thanks for the heads up @brunoleon!

I added a commit so that support for this version of Ubuntu is visible and to allow the test suite to test against this version. Unfortunately, some work is needed to fix CI (because the branch is old, it is merged with the current master before the test suite start).

@grant-veepshosting Can you please rebase your branch on top of the main one?

From your branch in your fork:

git pull               # Get the commit I added on top of your fork
git remote add vox https://github.com/voxpupuli/puppet-fail2ban.git # Add a "vox" remote for this repo
git fetch vox          # Download the latest code we have here
git rebase vox/master  # Move your commits on top of the main branch
git push -f            # Send the changes (-f is required because we re-wrote history)

Then the line number is the CI report will make sense and fixing the issue will be possible.

Thanks!

@grant-veepshosting
Copy link
Contributor Author

Done now, thanks for providing the steps and your patience - busy start to the week.

@smortex
Copy link
Member

smortex commented Sep 20, 2022

Nice, thanks! The remaining CI failure should be easy to fix 😉, do you mind give it a try?


Failures:

  1) fail2ban on ubuntu-22.04-x86_64 is expected to contain Class[fail2ban] with config_file_template => "a new os.name or os.release.major needs a new case"
     Failure/Error: it { is_expected.to contain_class('fail2ban').with_config_file_template('a new os.name or os.release.major needs a new case') }
       expected that the catalogue would contain Class[fail2ban] with config_file_template set to "a new os.name or os.release.major needs a new case" but it is set to "fail2ban/Ubuntu/22.04/etc/fail2ban/jail.conf.epp"
     # ./spec/classes/init_spec.rb:43:in `block (4 levels) in <top (required)>'

Finished in 18.17 seconds (files took 11.33 seconds to load)
525 examples, 1 failure

when ['Ubuntu', '18.04']
it { is_expected.to contain_class('fail2ban').with_config_file_template('fail2ban/Ubuntu/18.04/etc/fail2ban/jail.conf.epp') }
when ['Ubuntu', '20.04']
it { is_expected.to contain_class('fail2ban').with_config_file_template('fail2ban/Ubuntu/20.04/etc/fail2ban/jail.conf.epp') }
else
# has to be better way of doing this.
it { is_expected.to contain_class('fail2ban').with_config_file_template('a new os.name or os.release.major needs a new case') }
end

Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smortex smortex merged commit bfc920e into voxpupuli:master Sep 20, 2022
@Dan33l Dan33l mentioned this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants