Skip to content

Commit 12cfb59

Browse files
author
Lennart Betz
authored
Merge pull request #397 from Icinga/bug/optional-resource-params
Parameters host and port are optional for resource::database
2 parents 40ac39c + 097eff4 commit 12cfb59

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

REFERENCE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5004,17 +5004,21 @@ Set database type to connect.
50045004

50055005
##### <a name="-icingaweb2--resource--database--host"></a>`host`
50065006

5007-
Data type: `Stdlib::Host`
5007+
Data type: `Optional[Stdlib::Host]`
50085008

50095009
Connect to the database on the given host. For using unix domain sockets, specify 'localhost' for
50105010
MySQL and the path to the unix domain socket and the directory for PostgreSQL.
50115011

5012+
Default value: `undef`
5013+
50125014
##### <a name="-icingaweb2--resource--database--port"></a>`port`
50135015

5014-
Data type: `Stdlib::Port`
5016+
Data type: `Optional[Stdlib::Port]`
50155017

50165018
Port number to use.
50175019

5020+
Default value: `undef`
5021+
50185022
##### <a name="-icingaweb2--resource--database--database"></a>`database`
50195023

50205024
Data type: `String`

manifests/resource/database.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262
define icingaweb2::resource::database (
6363
Enum['mysql', 'pgsql', 'mssql',
6464
'oci', 'oracle', 'ibm', 'sqlite'] $type,
65-
Stdlib::Host $host,
6665
String $database,
67-
Stdlib::Port $port,
6866
String $resource_name = $title,
67+
Optional[Stdlib::Host] $host = undef,
68+
Optional[Stdlib::Port] $port = undef,
6969
Optional[String] $username = undef,
7070
Optional[Icingaweb2::Secret] $password = undef,
7171
Optional[String] $charset = undef,

0 commit comments

Comments
 (0)