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

Find nodes within the same environment #5

Open
fernandohonig opened this issue Jun 3, 2015 · 1 comment
Open

Find nodes within the same environment #5

fernandohonig opened this issue Jun 3, 2015 · 1 comment

Comments

@fernandohonig
Copy link

At the moment seems not possible to search for a tag within a specific environment. It just searches for a tag including all nodes on every environments.

@martinb3
Copy link
Contributor

martinb3 commented Jun 3, 2015

I would recommend including your environment as a tag -- we wanted to avoid making this specific to chef search (i.e. we thought one day we could replace it with another service discovery mechanism which might not have access to the chef environment natively).

For example:

discovery 'my_cookbook_mysql_master' do
  tags ['mysql', 'master', node.chef_environment]
  action :search
end

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

No branches or pull requests

2 participants