Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow default cluster/facet roles to be overridden #9

Merged
merged 2 commits into from May 16, 2011
Merged

Allow default cluster/facet roles to be overridden #9

merged 2 commits into from May 16, 2011

Conversation

betamatt
Copy link
Contributor

@betamatt betamatt commented May 9, 2011

Currently each created node gets two default roles named "#{cluster_name}" and "#{cluster_name}_facet". This is a great convention but users should have the option to do something different.

This patch introduces the cluster_role and facet_role options to allow custom roles to be used or to disable the role addition by setting cluster/facet_role to false.

def initialize clname
super(clname)
@facets = {}
chef_attributes :cluster_name => clname
cluster_role clname
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but can you make it so this assigns the role "#{clname}_cluster" (meaning the change is zero-impact) -- given that fix I'll merge

@betamatt
Copy link
Contributor Author

Whoops. Fixed.

howech added a commit that referenced this pull request May 16, 2011
Allow default cluster/facet roles to be overridden
@howech howech merged commit 98e5e3d into infochimps-labs:version_2 May 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants