Skip to content

Commit

Permalink
Allow specification of apt repository URL (#769)
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Wagner <andy.wagner@utoronto.ca>
  • Loading branch information
Rarian authored Jan 31, 2024
1 parent 6136168 commit f6a231d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in the last 3 major versions of the postg

## Unreleased

- Add `apt_repository_uri` property to `postgresql_install` resource

## 11.10.0 - *2024-01-24*

- Modify installed_postgresql_package_source to get highest PG version from packages
Expand Down
1 change: 1 addition & 0 deletions documentation/postgresql_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
| `repo_pgdg_updates_testing` | | true, false | | Create pgdg-updates-testing repo | |
| `repo_pgdg_source_updates_testing` | | true, false | | Create pgdg-source-updates-testing repo | |
| `yum_gpg_key_uri` | | String | | YUM/DNF GPG key URL | |
| `apt_repository_uri` | | String | | apt repository URL | |
| `apt_gpg_key_uri` | | String | | apt GPG key URL | |
| `initdb_additional_options` | | String | | Additional options to pass to the initdb command | |
| `initdb_locale` | | String | | Locale to use for the initdb command | |
Expand Down
6 changes: 5 additions & 1 deletion resources/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
default: lazy { default_yum_gpg_key_uri },
description: 'YUM/DNF GPG key URL'

property :apt_repository_uri, String,
default: 'https://download.postgresql.org/pub/repos/apt/',
description: 'apt repository URL'

property :apt_gpg_key_uri, String,
default: 'https://download.postgresql.org/pub/repos/apt/ACCC4CF8.asc',
description: 'apt GPG key URL'
Expand Down Expand Up @@ -162,7 +166,7 @@ def do_repository_action(repo_action)
package 'apt-transport-https'

apt_repository "postgresql_org_repository_#{new_resource.version.to_s}" do
uri 'https://download.postgresql.org/pub/repos/apt/'
uri new_resource.apt_repository_uri
components ['main', new_resource.version.to_s]
distribution "#{node['lsb']['codename']}-pgdg"
key new_resource.apt_gpg_key_uri
Expand Down

0 comments on commit f6a231d

Please # to comment.