Skip to content

Commit

Permalink
Merge pull request #218 from traylenator/render
Browse files Browse the repository at this point in the history
Render post_transaction_action examples correctly
  • Loading branch information
bastelfreak authored Jul 6, 2021
2 parents 09cc4d1 + 0da0ff8 commit fbda272
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 27 deletions.
29 changes: 11 additions & 18 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,7 @@ A $(yum clean all) Exec to be notified if desired.

### <a name="yumpluginpost_transaction_actions"></a>`yum::plugin::post_transaction_actions`

class{'yum::plugin::post_transaction_actions':
ensure => present,
}
Class to install post_transaction plugin

* **See also**
* https://dnf-plugins-core.readthedocs.io/en/latest/post-transaction-actions.html
Expand All @@ -238,7 +236,9 @@ class{'yum::plugin::post_transaction_actions':
##### Enable post_transaction_action plugin

```puppet
class{'yum::plugin::post_transaction_actions':
ensure => present,
}
```

#### Parameters
Expand Down Expand Up @@ -611,11 +611,7 @@ Default value: ``undef``

### <a name="yumpost_transaction_action"></a>`yum::post_transaction_action`

yum::post_transaction_action{'touch file on ssh package update':
key => 'openssh-*',
state => 'any',
command => 'touch /tmp/openssh-installed',
}
Creates post transaction configuratons for dnf or yum.

* **See also**
* https://dnf-plugins-core.readthedocs.io/en/latest/post-transaction-actions.html
Expand All @@ -626,7 +622,11 @@ yum::post_transaction_action{'touch file on ssh package update':
##### Touch a file when ssh is package is updated, installed or removed.

```puppet
yum::post_transaction_action{'touch file on ssh package update':
key => 'openssh-*',
state => 'any',
command => 'touch /tmp/openssh-installed',
}
```

#### Parameters
Expand All @@ -636,7 +636,6 @@ The following parameters are available in the `yum::post_transaction_action` def
* [`action`](#action)
* [`key`](#key)
* [`state`](#state)
* [`action`](#action)
* [`command`](#command)

##### <a name="action"></a>`action`
Expand All @@ -662,17 +661,11 @@ Can be `in`, `out` or `any` on DNF based systems.

Default value: `'any'`

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

The command to run

Default value: `$title`

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

Data type: `String[1]`


The command to run

### <a name="yumversionlock"></a>`yum::versionlock`

Expand Down
6 changes: 3 additions & 3 deletions manifests/plugin/post_transaction_actions.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# @param ensure Should the post_transaction actions plugin be installed
#
# @example Enable post_transaction_action plugin
# class{'yum::plugin::post_transaction_actions':
# ensure => present,
# }
# class{'yum::plugin::post_transaction_actions':
# ensure => present,
# }
#
class yum::plugin::post_transaction_actions (
Enum['present', 'absent'] $ensure = 'present',
Expand Down
12 changes: 6 additions & 6 deletions manifests/post_transaction_action.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# @param state
# Can be `install`, `update`, `remove` or `any` on YUM based systems.
# Can be `in`, `out` or `any` on DNF based systems.
# @param action The command to run
# @param command The command to run
#
# @example Touch a file when ssh is package is updated, installed or removed.
# yum::post_transaction_action{'touch file on ssh package update':
# key => 'openssh-*',
# state => 'any',
# command => 'touch /tmp/openssh-installed',
# }
# yum::post_transaction_action{'touch file on ssh package update':
# key => 'openssh-*',
# state => 'any',
# command => 'touch /tmp/openssh-installed',
# }
#
define yum::post_transaction_action (
Variant[Enum['*'],Yum::RpmNameGlob,Stdlib::Unixpath] $key,
Expand Down

0 comments on commit fbda272

Please sign in to comment.