diff --git a/src/propertyshelf/fabfile/plone/__init__.py b/src/propertyshelf/fabfile/plone/__init__.py index 057939d..9a78b37 100644 --- a/src/propertyshelf/fabfile/plone/__init__.py +++ b/src/propertyshelf/fabfile/plone/__init__.py @@ -4,15 +4,18 @@ import client import database import frontend +import roles client = client # PyFlakes database = database # PyFlakes frontend = frontend # PyFlakes +roles = roles __all__ = [ 'client', 'database', 'frontend', + 'roles', ] diff --git a/src/propertyshelf/fabfile/plone/roles.py b/src/propertyshelf/fabfile/plone/roles.py new file mode 100644 index 0000000..c94a787 --- /dev/null +++ b/src/propertyshelf/fabfile/plone/roles.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +"""Manage chef roles.""" + +from fabric import api +from propertyshelf.fabfile.common import roles + + +@api.task +def check(): + """Check if the required roles are available.""" + roles.check_required() + + +@api.task +def create_missing(): + """Create missing roles on the chef server.""" + raise NotImplementedError + + +@api.task +def list_nodes(role_list=None): + """List all available nodes with given roles.""" + roles.list_nodes()