Coder Social home page Coder Social logo

Comments (5)

sethvargo avatar sethvargo commented on July 27, 2024 1

I would recommend controlling that action (adding to the AD) with an attribute instead of checking what type of Chef you're running. Then override that attribute in the Vagrantfile

from chef-zero.

sethvargo avatar sethvargo commented on July 27, 2024

@JCosta how are you using Chef Zero? It functions as a full Chef Server, so you shouldn't need these types of conditionals.

from chef-zero.

jkeiser avatar jkeiser commented on July 27, 2024

If you need to check, you can look at Chef::Config[:chef_server_url] and see if it contains 127.0.0.1, or you can connect and look at the Server header (which has chef-zero in it).

But right now, chef isn't actually IN a different "mode." For all it knows, it's talking to a full Chef server. And there shouldn't ever be any functional way to tell the difference.

from chef-zero.

Azulinho avatar Azulinho commented on July 27, 2024

My base role is joining my VM to the domain, since I'm doing vagrant
destroy/up/provision a billion times a day, I end up with a gazillion
machines in AD.
I would like to avoid running a set of recipes by validating if this
particular chef-run is a chef-zero run.

Currently I am adding json attributes to my vagrantfile, and checking for
those "chef-zero" values inside my recipes.

On 15 July 2013 17:41, Seth Vargo [email protected] wrote:

@JCosta https://github.com/jcosta how are you using Chef Zero? It
functions as a full Chef Server, so you shouldn't need these types of
conditionals.


Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-20982570
.

from chef-zero.

Azulinho avatar Azulinho commented on July 27, 2024

Checking the chef_server_url is likely to be enough.
Thanks

On 15 July 2013 18:15, John Keiser [email protected] wrote:

If you need to check, you can look at Chef::Config[:chef_server_url] and
see if it contains 127.0.0.1, or you can connect and look at the Server
header (which has chef-zero in it).

But right now, chef isn't actually IN a different "mode." For all it
knows, it's talking to a full Chef server. And there shouldn't ever be any
functional way to tell the difference.


Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-20984838
.

from chef-zero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.