summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/__init__.py
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-08-01 02:10:51 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2014-08-01 02:25:13 +0200
commit7193a42822d1aa1ec8165297246b9260eda6c68f (patch)
tree1d80f3e0ba452f83b9f0ef3862a1662a1edc8df3 /src/lib/Bcfg2/Client/__init__.py
parent01b9683dddc2cb42edf4fe2193ef59ce3cc41d6c (diff)
downloadbcfg2-7193a42822d1aa1ec8165297246b9260eda6c68f.tar.gz
bcfg2-7193a42822d1aa1ec8165297246b9260eda6c68f.tar.bz2
bcfg2-7193a42822d1aa1ec8165297246b9260eda6c68f.zip
Client: add --only-important command line option
Add the new --only-important (-i) command line option. With this option bcfg2 will only configure the important entries and exits clean afterwards.
Diffstat (limited to 'src/lib/Bcfg2/Client/__init__.py')
-rw-r--r--src/lib/Bcfg2/Client/__init__.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Client/__init__.py b/src/lib/Bcfg2/Client/__init__.py
index f1b32d929..138c17546 100644
--- a/src/lib/Bcfg2/Client/__init__.py
+++ b/src/lib/Bcfg2/Client/__init__.py
@@ -144,7 +144,10 @@ class Client(object):
Bcfg2.Options.BooleanOption(
"-e", "--show-extra", help='Enable extra entry output'),
Bcfg2.Options.BooleanOption(
- "-k", "--kevlar", help='Run in bulletproof mode')]
+ "-k", "--kevlar", help='Run in bulletproof mode'),
+ Bcfg2.Options.BooleanOption(
+ "-i", "--only-important",
+ help='Only configure the important entries')]
def __init__(self):
self.config = None
@@ -845,11 +848,13 @@ class Client(object):
self.times['inventory'] = time.time()
self.CondDisplayState('initial')
self.InstallImportant()
- self.Decide()
- self.Install()
- self.times['install'] = time.time()
- self.Remove()
- self.times['remove'] = time.time()
+ if not Bcfg2.Options.setup.only_important:
+ self.Decide()
+ self.Install()
+ self.times['install'] = time.time()
+ self.Remove()
+ self.times['remove'] = time.time()
+
if self.modified:
self.ReInventory()
self.times['reinventory'] = time.time()