Skip to content

Commit 926bb7c

Browse files
author
Daniel Carabas
committed
Fix providers documentation
1 parent 79d9f21 commit 926bb7c

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

REFERENCE.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2378,7 +2378,7 @@ The following properties are available in the `postgresql_conn_validator` type.
23782378

23792379
Valid values: present, absent
23802380

2381-
The basic property that the resource should be in.
2381+
Ensure connection validation
23822382

23832383
Default value: present
23842384

@@ -2466,11 +2466,11 @@ An arbitrary tag for your own reference; the name of the message.
24662466

24672467
##### `unless`
24682468

2469-
2469+
Optional SQL command to execute before the main command
24702470

24712471
##### `onlyif`
24722472

2473-
2473+
Optional SQL command executed before the main command - return true if matching row found
24742474

24752475
##### `connect_settings`
24762476

lib/puppet/provider/postgresql_psql/ruby.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Puppet::Type.type(:postgresql_psql).provide(:ruby) do
2+
desc 'Postgres psql provider'
23
def run_unless_sql_command(sql)
34
# for the 'unless' queries, we wrap the user's query in a 'SELECT COUNT',
45
# which makes it easier to parse and process the output.
@@ -63,5 +64,4 @@ def run_command(command, user, group, environment)
6364
custom_environment: environment)
6465
[output, $CHILD_STATUS.dup]
6566
end
66-
6767
end

lib/puppet/provider/postgresql_replication_slot/ruby.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Puppet::Type.type(:postgresql_replication_slot).provide(:ruby) do
2-
# For confinement
2+
desc 'For confinement'
33
commands psql: 'psql'
44

55
def self.instances

lib/puppet/type/postgresql_conn_validator.rb

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
purposes such as monitoring."
77

88
ensurable do
9+
desc 'Ensure connection validation'
910
defaultvalues
1011
defaultto :present
1112
end

lib/puppet/type/postgresql_psql.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def sync
2626
end
2727

2828
newparam(:unless) do
29-
Desc 'An optional SQL command to execute prior to the main :command; ' \
29+
desc 'Optional SQL command to execute before the main command'
30+
31+
desc 'An optional SQL command to execute prior to the main :command; ' \
3032
'this is generally intended to be used for idempotency, to check ' \
3133
'for the existence of an object in the database to determine whether ' \
3234
'or not the main SQL command needs to be executed at all.'
@@ -45,7 +47,9 @@ def matches(value)
4547
end
4648

4749
newparam(:onlyif) do
48-
Desc 'An optional SQL command to execute prior to the main :command; ' \
50+
desc 'Optional SQL command executed before the main command - return true if matching row found'
51+
52+
desc 'An optional SQL command to execute prior to the main :command; ' \
4953
'this is generally intended to be used for idempotency, to check ' \
5054
'for the existence of an object in the database to determine whether ' \
5155
'or not the main SQL command needs to be executed at all.'

0 commit comments

Comments
 (0)