Fail when the rundeck module was not loaded
Change-Id: Ic59325a4bc791b0934959b8af3f5cc1ed58ee788
diff --git a/_states/rundeck_project.py b/_states/rundeck_project.py
index 2e877a6..5919297 100644
--- a/_states/rundeck_project.py
+++ b/_states/rundeck_project.py
@@ -3,6 +3,16 @@
LOG = logging.getLogger(__name__)
+def __virtual__():
+ if 'rundeck.get_project' not in __salt__:
+ return (
+ False,
+ 'The rundeck_project state module cannot be loaded: rundeck is '
+ 'unavailable',
+ )
+ return True
+
+
def present(name, description=''):
ret = {
'name': name,