-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for required roles and list associated hosts.
- Loading branch information
Thomas Massmann
committed
Dec 13, 2013
1 parent
797b714
commit 9f507ca
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |