Skip to content

Commit 30503af

Browse files
authored
Merge branch 'puppetlabs:main' into fix_table_grant_with_schema
2 parents 23b01fd + f8e2568 commit 30503af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1463
-1214
lines changed

.fixtures.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ fixtures:
55
repo: "https://github.com/puppetlabs/puppetlabs-augeas_core.git"
66
puppet_version: ">= 6.0.0"
77
concat: "https://github.com/puppetlabs/puppetlabs-concat.git"
8+
cron_core: "https://github.com/puppetlabs/puppetlabs-cron_core.git"
89
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
910
firewall: "https://github.com/puppetlabs/puppetlabs-firewall.git"
1011
provision: "https://github.com/puppetlabs/provision.git"

.github/workflows/labeller.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: community-labeller
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
pull_request_target:
8+
types:
9+
- opened
10+
11+
jobs:
12+
label:
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- uses: puppetlabs/community-labeller@v0
17+
name: Label issues or pull requests
18+
with:
19+
label_name: community
20+
label_color: '5319e7'
21+
org_membership: puppetlabs
22+
token: ${{ secrets.IAC_COMMUNITY_LABELER }}

.github/workflows/nightly.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111

1212
jobs:
1313
setup_matrix:
14+
if: ${{ github.repository_owner == 'puppetlabs' }}
1415
name: "Setup Test Matrix"
1516
runs-on: ubuntu-20.04
1617
outputs:
@@ -58,7 +59,7 @@ jobs:
5859
if: ${{ github.repository_owner == 'puppetlabs' }}
5960
run: |
6061
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
61-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2 --exclude-platforms '["Scientific-6", "Scientific-7", "Debian-9", "Debian-10", "Debian-11", "SLES-12", "SLES-15", "Ubuntu-14.04", "Ubuntu-16.04", "Ubuntu-18.04", "Ubuntu-20.04"]'
62+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2 --exclude-platforms '["Scientific-6", "Scientific-7", "Debian-9", "Debian-10", "Debian-11", "SLES-12", "SLES-15", "Ubuntu-14.04", "Ubuntu-16.04", "Ubuntu-18.04", "Ubuntu-20.04", "Ubuntu-22.04"]'
6263
else
6364
echo "::set-output name=matrix::{}"
6465
fi
@@ -186,7 +187,7 @@ jobs:
186187
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'
187188
188189
slack-workflow-status:
189-
if: always()
190+
if: ${{ github.repository_owner == 'puppetlabs' }}
190191
name: Post Workflow Status To Slack
191192
needs:
192193
- Acceptance
@@ -199,5 +200,5 @@ jobs:
199200
repo_token: ${{ secrets.GITHUB_TOKEN }}
200201
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK }}
201202
# Optional Input
202-
channel: '#team-ia-bots'
203+
channel: '#team-cat-bots'
203204
name: 'GABot'

.github/workflows/pr_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
id: get-matrix
6262
run: |
6363
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
64-
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2 --exclude-platforms '["Scientific-6", "Scientific-7", "Debian-9", "Debian-10", "Debian-11", "SLES-12", "SLES-15", "Ubuntu-14.04", "Ubuntu-16.04", "Ubuntu-18.04", "Ubuntu-20.04"]'
64+
buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2 --exclude-platforms '["Scientific-6", "Scientific-7", "Debian-9", "Debian-10", "Debian-11", "SLES-12", "SLES-15", "Ubuntu-14.04", "Ubuntu-16.04", "Ubuntu-18.04", "Ubuntu-20.04", "Ubuntu-22.04"]'
6565
else
6666
echo "::set-output name=matrix::{}"
6767
fi

.github/workflows/spec.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ jobs:
120120
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
121121
echo ::endgroup::
122122
123+
123124
- name: Run parallel_spec tests
124125
run: |
125126
buildevents cmd $TRACE_ID $STEP_ID 'rake parallel_spec Puppet ${{ matrix.puppet_version }}, Ruby ${{ matrix.ruby_version }}' -- bundle exec rake parallel_spec

.github/workflows/stale.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Audit aging issues/PRs
2+
3+
on:
4+
schedule:
5+
- cron: "30 1 * * *"
6+
7+
jobs:
8+
audit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v3
12+
with:
13+
repo-token: ${{ secrets.GITHUB_TOKEN }}
14+
days-before-issue-stale: 90
15+
days-before-pr-stale: 60
16+
days-before-pr-close: 7
17+
stale-issue-message: |
18+
Hello! 👋
19+
20+
This issue has been open for a while and has had no recent activity. We've labelled it with `attention-needed` so that we can get a clear view of which issues need our attention.
21+
22+
If you are waiting on a response from us we will try and address your comments on a future Community Day.
23+
24+
Alternatively, if it is no longer relevant to you please close the issue with a comment.
25+
stale-issue-label: 'attention-needed'
26+
stale-pr-message: |
27+
Hello! 👋
28+
29+
This pull request has been open for a while and has had no recent activity. We've labelled it with `attention-needed` so that we can get a clear view of which PRs need our attention.
30+
31+
If you are waiting on a response from us we will try and address your comments on a future Community Day.
32+
33+
Alternatively, if it is no longer relevant to you please close the PR with a comment.
34+
35+
Please note that if a pull request receives no update for 7 after it has been labelled, it will be closed. We are always happy to re-open pull request if they have been closed in error.
36+
stale-pr-label: 'attention-needed'

.puppet-lint.rc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
--relative
2+
--no-parameter_types-check
3+
--no-parameter_documentation-check
4+
--no-anchor_resource-check
5+
--no-params_empty_string_assignment-check

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require:
44
- rubocop-rspec
55
AllCops:
66
DisplayCopNames: true
7-
TargetRubyVersion: '2.4'
7+
TargetRubyVersion: '2.5'
88
Include:
99
- "**/*.rb"
1010
Exclude:

.sync.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,9 @@ spec/spec_helper.rb:
5858
unmanaged: false
5959
.travis.yml:
6060
delete: true
61+
Rakefile:
62+
extra_disabled_lint_checks:
63+
- parameter_types
64+
- parameter_documentation
65+
- anchor_resource
66+
- params_empty_string_assignment

CHANGELOG.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,55 @@
22

33
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
44

5-
## [v7.5.0](https://github.com/puppetlabs/puppetlabs-postgresql/tree/v7.5.0) (2021-09-27)
5+
## [v8.1.0](https://github.com/puppetlabs/puppetlabs-postgresql/tree/v8.1.0) (2022-07-21)
6+
7+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-postgresql/compare/v8.0.0...v8.1.0)
8+
9+
### Added
10+
11+
- Fix service status detection on Debian-based OSes [\#1349](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1349) ([arjenz](https://github.com/arjenz))
12+
- \(FM-8971\) allow deferred function for role pwd [\#1347](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1347) ([tvpartytonight](https://github.com/tvpartytonight))
13+
- Set version for Fedora 36 [\#1345](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1345) ([lweller](https://github.com/lweller))
14+
- Add Red Hat Enterprise Linux 9 support [\#1303](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1303) ([ekohl](https://github.com/ekohl))
15+
16+
### Fixed
17+
18+
- \(GH-1352\) - Updating postgresql service version on SLES [\#1353](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1353) ([pmcmaw](https://github.com/pmcmaw))
19+
- Respect $service\_status on Red Hat-based distros [\#1351](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1351) ([ekohl](https://github.com/ekohl))
20+
- Add version for Ubuntu 22.04 [\#1350](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1350) ([arjenz](https://github.com/arjenz))
21+
- README.md: correct postgresql\_conn\_validator example [\#1332](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1332) ([bastelfreak](https://github.com/bastelfreak))
22+
- pdksync - \(GH-iac-334\) Remove Support for Ubuntu 14.04/16.04 [\#1331](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1331) ([david22swan](https://github.com/david22swan))
23+
- Remove unused variable in reload.pp [\#1327](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1327) ([ekohl](https://github.com/ekohl))
24+
- Use systemctl reload on EL 7 and higher [\#1326](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1326) ([ekohl](https://github.com/ekohl))
25+
26+
## [v8.0.0](https://github.com/puppetlabs/puppetlabs-postgresql/tree/v8.0.0) (2022-03-03)
27+
28+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-postgresql/compare/v7.5.0...v8.0.0)
29+
30+
### Changed
31+
32+
- Support setting default\_privileges on all schemas [\#1298](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1298) ([fish-face](https://github.com/fish-face))
33+
34+
### Added
35+
36+
- add default version for Fedora 35 [\#1317](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1317) ([jflorian](https://github.com/jflorian))
37+
- add scram-sha-256 support [\#1313](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1313) ([fe80](https://github.com/fe80))
38+
- add support for Ubuntu Hirsute and Impish [\#1312](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1312) ([nicholascioli](https://github.com/nicholascioli))
39+
- Allow systemd to mask postgresql service file [\#1310](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1310) ([kim-sondrup](https://github.com/kim-sondrup))
40+
- Make ::contrib a noop on OSes without a contrib package [\#1309](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1309) ([carlosduelo](https://github.com/carlosduelo))
41+
- pdksync - \(IAC-1753\) - Add Support for AlmaLinux 8 [\#1308](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1308) ([david22swan](https://github.com/david22swan))
42+
- MODULES-11201: add service\_name for Ubuntu 18.04 and later [\#1306](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1306) ([moritz-makandra](https://github.com/moritz-makandra))
43+
- pdksync - \(IAC-1751\) - Add Support for Rocky 8 [\#1305](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1305) ([david22swan](https://github.com/david22swan))
44+
- Default privileges support schemas [\#1300](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1300) ([fish-face](https://github.com/fish-face))
45+
- Support target\_role in default\_privileges [\#1297](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1297) ([fish-face](https://github.com/fish-face))
46+
47+
### Fixed
48+
49+
- pdksync - \(IAC-1787\) Remove Support for CentOS 6 [\#1324](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1324) ([david22swan](https://github.com/david22swan))
50+
- Fix python package name in RHEL/CentOS 8 [\#1316](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1316) ([kajinamit](https://github.com/kajinamit))
51+
- Drop further code for Debian 6 and Ubuntu 10 [\#1307](https://github.com/puppetlabs/puppetlabs-postgresql/pull/1307) ([ekohl](https://github.com/ekohl))
52+
53+
## [v7.5.0](https://github.com/puppetlabs/puppetlabs-postgresql/tree/v7.5.0) (2021-09-28)
654

755
[Full Changelog](https://github.com/puppetlabs/puppetlabs-postgresql/compare/v7.4.1...v7.5.0)
856

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ group :development do
2424
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
2525
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
2626
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
27+
gem "voxpupuli-puppet-lint-plugins", '>= 3.0', require: false, platforms: [:ruby]
2728
gem "github_changelog_generator", require: false
2829
end
2930
group :system_tests do

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* [Create an access rule for pg_hba.conf](#create-an-access-rule-for-pg_hbaconf)
1616
* [Create user name maps for pg_ident.conf](#create-user-name-maps-for-pg_identconf)
1717
* [Validate connectivity](#validate-connectivity)
18+
* [Backups](#backups)
1819
4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
1920
5. [Limitations - OS compatibility, etc.](#limitations)
2021
6. [Development - Guide for contributing to the module](#development)
@@ -321,12 +322,33 @@ postgresql_conn_validator { 'validate my postgres connection':
321322
db_username => 'mydbuser',
322323
db_password => 'mydbpassword',
323324
db_name => 'mydbname',
324-
}->
325-
exec { 'rake db:migrate':
325+
psql_path => '/usr/bin/psql',
326+
}
327+
-> exec { 'rake db:migrate':
326328
cwd => '/opt/myrubyapp',
327329
}
328330
```
329331

332+
### Backups
333+
334+
This example demonstrates how to configure PostgreSQL backups with "pg_dump". This sets up a daily cron job to perform a full backup. Each backup will create a new directory. A cleanup job will automatically remove backups that are older than 15 days.
335+
336+
```
337+
class { 'postgresql::server':
338+
backup_enable => true,
339+
backup_provider => 'pg_dump',
340+
backup_options => {
341+
db_user => 'backupuser',
342+
db_password => 'secret',
343+
manage_user => true,
344+
rotate => 15,
345+
},
346+
...
347+
}
348+
```
349+
350+
It is possible to set parameter `$ensure` to `absent` in order to remove the backup job, user/role, backup script and password file. However, the actual backup files and directories will remain untouched.
351+
330352
## Reference
331353

332354
For information on the classes and types, see the [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/REFERENCE.md)

0 commit comments

Comments
 (0)