diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2015-05-10 16:27:14 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2015-05-10 16:27:14 +0200 |
commit | eb97e236e2b934f9696f3e4db802a3d8d7c563f9 (patch) | |
tree | 74809a088485506d7b5006470d930332c4ccb36a /src/lib/Bcfg2/Server | |
parent | 0856d5d1d55281b001a02cb6e1650e1f66147a62 (diff) | |
parent | 79838c23f2d9b2615c11fa460ed972ad6833c6fd (diff) | |
download | bcfg2-eb97e236e2b934f9696f3e4db802a3d8d7c563f9.tar.gz bcfg2-eb97e236e2b934f9696f3e4db802a3d8d7c563f9.tar.bz2 bcfg2-eb97e236e2b934f9696f3e4db802a3d8d7c563f9.zip |
Merge branch 'add-directory-ignore' into spline
* add-directory-ignore:
Server: Ignore directories containing a .bcfg2-ignore file
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugin/helpers.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin/helpers.py b/src/lib/Bcfg2/Server/Plugin/helpers.py index 5cfc8998c..245cfc256 100644 --- a/src/lib/Bcfg2/Server/Plugin/helpers.py +++ b/src/lib/Bcfg2/Server/Plugin/helpers.py @@ -456,7 +456,9 @@ class DirectoryBacked(Debuggable): # again without having to add a new monitor. elif os.path.isdir(abspath): # Deal with events for directories - if action in ['exists', 'created']: + if os.path.exists(os.path.join(abspath, '.bcfg2-ignore')): + self.logger.debug("Ignoring directory %s" % abspath) + elif action in ['exists', 'created']: self.add_directory_monitor(relpath) elif action == 'changed': if relpath in self.entries: |