puppet/zulip: Replace apt::source and apt::ppa with setup-apt-repo.

This commit is contained in:
rht 2018-12-05 20:02:30 +00:00 committed by Tim Abbott
parent c3aa7909ce
commit 97766102df
2 changed files with 7 additions and 26 deletions

View File

@ -1,24 +1,7 @@
# This depends on zulip::base having already been evaluated
class zulip::apt_repository {
if $zulip::base::release_name == 'stretch' {
apt::source {'zulip':
location => 'https://packagecloud.io/zulip/server/debian/',
release => $zulip::base::release_name,
repos => 'main',
key => 'E0847BF76A5F64D82ED0A038B97552F31FBFF74F',
key_source => 'https://packagecloud.io/zulip/server/gpgkey',
pin => '995',
include_src => false,
}
} else {
apt::source {'zulip':
location => 'http://ppa.launchpad.net/tabbott/zulip/ubuntu',
release => $zulip::base::release_name,
repos => 'main',
key => '84C2BE60E50E336456E4749CE84240474E26AE47',
key_source => 'https://zulip.org/dist/keys/zulip-ppa.asc',
pin => '995',
include_src => true,
}
$setup_apt_repo_file = "${::zulip_scripts_path}/lib/setup-apt-repo"
exec{'setup_apt_repo':
command => "bash -c '${setup_apt_repo_file}'",
}
}

View File

@ -1,5 +1,6 @@
# Minimal shared configuration needed to run a Zulip postgres database.
class zulip::postgres_appdb_base {
include zulip::apt_repository
include zulip::postgres_common
include zulip::supervisor
include zulip::process_fts_updates
@ -11,7 +12,7 @@ class zulip::postgres_appdb_base {
zulip::safepackage {
$appdb_packages:
ensure => 'installed',
require => Apt::Source['zulip'],
require => Exec['setup_apt_repo'],
}
# We bundle a bunch of other sysctl parameters into 40-postgresql.conf
@ -49,14 +50,11 @@ class zulip::postgres_appdb_base {
$pgroonga = zulipconf('machine', 'pgroonga', '')
if $pgroonga == 'enabled' {
apt::ppa {'ppa:groonga/ppa':
before => Package["postgresql-${zulip::base::postgres_version}-pgroonga"],
}
# Needed for optional our full text search system
package{"postgresql-${zulip::base::postgres_version}-pgroonga":
ensure => 'installed',
require => Package["postgresql-${zulip::base::postgres_version}"],
require => [Package["postgresql-${zulip::base::postgres_version}"],
Exec['setup_apt_repo']],
}
$pgroonga_setup_sql_path = "/usr/share/postgresql/${zulip::base::postgres_version}/pgroonga_setup.sql"