Skip to content

Commit

Permalink
Improve nginx::package_source documentation
Browse files Browse the repository at this point in the history
This is not a free-form String so prefer an enum and add some
documentation about the supported values.
  • Loading branch information
smortex committed Oct 5, 2023
1 parent e984c16 commit aed52f5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
20 changes: 19 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* [`Nginx::ErrorLogSeverity`](#Nginx--ErrorLogSeverity)
* [`Nginx::GzipProxied`](#Nginx--GzipProxied): custom type for gzip_proxied
* [`Nginx::LogFormat`](#Nginx--LogFormat)
* [`Nginx::Package_source`](#Nginx--Package_source): Where to download NGINX from There are three versions of NGINX available: * stable (`nginx` or `nginx-stable`); * mainline (`nginx-mainline`
* [`Nginx::Size`](#Nginx--Size)
* [`Nginx::StringMappings`](#Nginx--StringMappings): custom type for the `map` variable mapping
* [`Nginx::Time`](#Nginx--Time)
Expand Down Expand Up @@ -1449,7 +1450,7 @@ Default value: `$nginx::params::package_name`

##### <a name="-nginx--package_source"></a>`package_source`

Data type: `String`
Data type: `Nginx::Package_source`



Expand Down Expand Up @@ -5186,6 +5187,23 @@ Variant[String[1], Struct[{
}]]
```

### <a name="Nginx--Package_source"></a>`Nginx::Package_source`

Where to download NGINX from

There are three versions of NGINX available:
* stable (`nginx` or `nginx-stable`);
* mainline (`nginx-mainline`);
* passenger (`passenger`).

The mainline branch gets new features and bugfixes sooner but might introduce new bugs as well. Critical bugfixes are backported to the stable branch.

In general, the stable release is recommended, but the mainline release is typically quite stable as well.

In addition, Phusion provide packages for NGINX + Passenger (`passenger`).

Alias of `Enum['nginx', 'nginx-stable', 'nginx-mainline', 'passenger']`

### <a name="Nginx--Size"></a>`Nginx::Size`

The Nginx::Size data type.
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
### START Package Configuration ###
String $package_ensure = installed,
String $package_name = $nginx::params::package_name,
String $package_source = 'nginx',
Nginx::Package_source $package_source = 'nginx',
Optional[String] $package_flavor = undef,
Boolean $manage_repo = $nginx::params::manage_repo,
Hash[String[1], String[1]] $mime_types = $nginx::params::mime_types,
Expand Down
18 changes: 18 additions & 0 deletions types/package_source.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Where to download NGINX from
#
# There are three versions of NGINX available:
# * stable (`nginx` or `nginx-stable`);
# * mainline (`nginx-mainline`);
# * passenger (`passenger`).
#
# The mainline branch gets new features and bugfixes sooner but might introduce new bugs as well. Critical bugfixes are backported to the stable branch.
#
# In general, the stable release is recommended, but the mainline release is typically quite stable as well.
#
# In addition, Phusion provide packages for NGINX + Passenger (`passenger`).
type Nginx::Package_source = Enum[
'nginx',
'nginx-stable',
'nginx-mainline',
'passenger',
]

0 comments on commit aed52f5

Please sign in to comment.