Skip to content

Commit

Permalink
Add recurse parameter to the inicron.d directory so that it unmanaged… (
Browse files Browse the repository at this point in the history
#54)

* Add recurse parameter to the incron.d directory so that unmanaged files get deleted.

Co-authored-by: Trevor Vaughan <trevor@sicura.us>
  • Loading branch information
bschonec and trevor-vaughan committed May 13, 2022
1 parent 33c9820 commit 2bb8d5f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* Fri May 13 2022 Brian Schonecker <brian.schonecker@nfiindustries.com> - 0.6.1
- Ensure that incron files are deleted when `purge` is `true`

* Tue Jun 15 2021 Chris Tessmer <chris.tessmer@onyxpoint.com> - 0.6.0
- Removed support for Puppet 5
- Ensured support for Puppet 7 in requirements and stdlib
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ incron::users:
```

New system table entries can be added to `/etc/incron.d/` directory with the `incron::system_table` defined type, or
with the `incron::system_table` hash in hiera. The following example adds two new system table entries to `/etc/incron.d/` directory:
with the `incron::system_table` hash in hiera. The following example adds two new system table entries to `/etc/incron.d/`
directory and removes unmanaged files:

```yaml
incron::purge: true
incron::system_table:
allowrw:
path: '/data/'
Expand Down
11 changes: 6 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@
}

file { '/etc/incron.d':
ensure => 'directory',
owner => 'root',
group => 'root',
mode => '0755',
purge => $purge
ensure => 'directory',
owner => 'root',
group => 'root',
mode => '0755',
purge => $purge,
recurse => $purge
}

init_ulimit { 'mod_open_files_incrond':
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simp-incron",
"version": "0.6.0",
"version": "0.6.1",
"author": "SIMP Team",
"summary": "A SIMP Puppet module for managing incron",
"license": "Apache-2.0",
Expand Down

0 comments on commit 2bb8d5f

Please sign in to comment.