cdist-type__clean_path - Remove files and directories which match the pattern.
Remove files and directories which match the pattern.
Provided path (as __object_id) must be a directory.
Patterns are passed to
-regex - see
find(1) for more details.
Look up of files and directories is non-recursive (
Parent directory is excluded (
This type is not POSIX compatible (sorry, Solaris users).
16.17.3. REQUIRED PARAMETERS¶
- Pattern of files which are removed from path.
16.17.4. OPTIONAL PARAMETERS¶
- Pattern of files which are excluded from removal.
- The code to run if files or directories were removed.
__clean_path /etc/apache2/conf-enabled \ --pattern '.+' \ --exclude '.+\(charset\.conf\|security\.conf\)' \ --onchange 'service apache2 restart'
Copyright (C) 2019 Ander Punnar. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.