Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing docs and simplify period_method check #109

Merged
merged 2 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 61 additions & 29 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#### Public Classes

* [`fetchcrl`](#fetchcrl)
* [`fetchcrl`](#fetchcrl): Main class, installs fetch-crl and configures it.

#### Private Classes

Expand All @@ -24,12 +24,47 @@

### <a name="fetchcrl"></a>`fetchcrl`

The fetchcrl class.
fetchcrl

* **See also**
* https://wiki.nikhef.nl/grid/FetchCRL3
* FetchCRL3

#### Examples

##### Simple Example

```puppet
class{'fetchcrl':
http_proxy => 'http:://squid.example.org:8000',
carepo => 'http://yum.example.org/yumrepo',
cache_control_request => '3600',
}
```

##### A hash of particular CA configurations

```puppet
class{'fetchcrl':
cas => {
'EDG-Tutorial-CA' => {
'agingtolerance' => 168,
}
'MD-Grid-CA-T' => {
'noerrors' => true,
}
}
}
}
```

#### Parameters

The following parameters are available in the `fetchcrl` class:

* [`capkgs`](#-fetchcrl--capkgs)
* [`carepo`](#-fetchcrl--carepo)
* [`carepo_gpgkey`](#-fetchcrl--carepo_gpgkey)
* [`manage_carepo`](#-fetchcrl--manage_carepo)
* [`capkgs_version`](#-fetchcrl--capkgs_version)
* [`pkg_version`](#-fetchcrl--pkg_version)
Expand All @@ -48,9 +83,30 @@ The following parameters are available in the `fetchcrl` class:
* [`randomcron`](#-fetchcrl--randomcron)
* [`cache_control_request`](#-fetchcrl--cache_control_request)
* [`cas`](#-fetchcrl--cas)
* [`capkgs`](#-fetchcrl--capkgs)
* [`carepo`](#-fetchcrl--carepo)
* [`carepo_gpgkey`](#-fetchcrl--carepo_gpgkey)

##### <a name="-fetchcrl--capkgs"></a>`capkgs`

Data type: `Array[String[1]]`

CA policy packages to install.

Default value: `['ca-policy-egi-core']`

##### <a name="-fetchcrl--carepo"></a>`carepo`

Data type: `Stdlib::Httpurl`

Repository URL of CA packages.

Default value: `'https://repository.egi.eu/sw/production/cas/1/current/'`

##### <a name="-fetchcrl--carepo_gpgkey"></a>`carepo_gpgkey`

Data type: `Stdlib::Httpurl`

Repository URL of GPG key for CA packages.

Default value: `'https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3'`

##### <a name="-fetchcrl--manage_carepo"></a>`manage_carepo`

Expand Down Expand Up @@ -200,30 +256,6 @@ A hash of `fetchcrl::ca` defined types to load.

Default value: `undef`

##### <a name="-fetchcrl--capkgs"></a>`capkgs`

Data type: `Array[String[1]]`



Default value: `['ca-policy-egi-core']`

##### <a name="-fetchcrl--carepo"></a>`carepo`

Data type: `Stdlib::Httpurl`



Default value: `'https://repository.egi.eu/sw/production/cas/1/current/'`

##### <a name="-fetchcrl--carepo_gpgkey"></a>`carepo_gpgkey`

Data type: `Stdlib::Httpurl`



Default value: `'https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3'`

## Defined types

### <a name="fetchcrl--ca"></a>`fetchcrl::ca`
Expand Down
6 changes: 2 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#
# @param carepo_gpgkey
# Repository URL of GPG key for CA packages.

#
# @param manage_carepo
# Should package repository be configured.
#
Expand Down Expand Up @@ -117,9 +117,7 @@
Optional[Hash] $cas = undef,
) {
# Is the package cron or systemd.timer based?
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'],'18.04') <= 0 ) or
($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'],'10') <= 0 ) or
($facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'7') <= 0 ) {
if $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'7') <= 0 {
zilchms marked this conversation as resolved.
Show resolved Hide resolved
$periodic_method = 'cron'
} else {
$periodic_method = 'timer'
Expand Down