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

Drop Ubuntu 10/12/14 code #1385

Merged
merged 1 commit into from
Jan 23, 2021
Merged
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
28 changes: 10 additions & 18 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,7 @@
}
}
'Debian': {
if ($facts['os']['name'] == 'ubuntu' and $facts['os']['distro']['codename'] in ['bionic'])
or ($facts['os']['name'] == 'debian' and $facts['os']['release']['major'] in ['9', '10']) {
$_module_os_overrides = {
'manage_repo' => true,
'daemon_user' => 'www-data',
'log_user' => 'root',
'log_group' => 'adm',
'log_mode' => '0755',
'run_dir' => '/run/nginx',
'passenger_package_name' => 'libnginx-mod-http-passenger',
'include_modules_enabled' => true,
}
} elsif ($facts['os']['name'] == 'ubuntu' and $facts['os']['distro']['codename'] in ['lucid', 'precise', 'trusty', 'xenial']) {
if ($facts['os']['name'] == 'ubuntu' and $facts['os']['distro']['codename'] == 'xenial') {
$_module_os_overrides = {
'manage_repo' => true,
'daemon_user' => 'www-data',
Expand All @@ -130,13 +118,17 @@
'log_mode' => '0755',
'run_dir' => '/run/nginx',
}
# The following was designed/tested on Ubuntu 18 and Debian 9/10 but probably works on newer versions as well
} else {
Copy link
Member

Choose a reason for hiding this comment

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

Why drop this? Doesn't Ubuntu 18.04 hit this? I also think it'd be a better and safer thing to have an else clause. If anything, Xenial should perhaps not manage the repo at all.

Copy link
Member Author

Choose a reason for hiding this comment

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

the syntax isn't perfect here, above this block is one explicitly for Debian 9/10 and Ubuntu 18

Copy link
Member

Choose a reason for hiding this comment

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

Still, having a safe default feels better to me. I'd also be in favor of dropping manage_repo => true and moving to not managing it by default. Then we can make the else block the future proof one so Debian 11/Ubuntu 20.04 are more likely to just work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if we should change any default here. However I'm fine with providing a default block that catches newer ubuntu/debian version to be future-proof. My personal preference is also to always use the upstream repositories and not the packages from Ubuntu.

$_module_os_overrides = {
'daemon_user' => 'www-data',
'log_user' => 'root',
'log_group' => 'adm',
'log_mode' => '0755',
'run_dir' => '/run/nginx',
'manage_repo' => true,
'daemon_user' => 'www-data',
'log_user' => 'root',
'log_group' => 'adm',
'log_mode' => '0755',
'run_dir' => '/run/nginx',
'passenger_package_name' => 'libnginx-mod-http-passenger',
'include_modules_enabled' => true,
}
}
}
Expand Down