gliptak
gliptak

Reputation: 3670

node attribute containing Chef server URL?

Would Chef server URL be accessible as an attribute of a node? I would like to have a custom recipe behaviour changed based on the server id (URL) the node is connected to.

https://docs.chef.io/ohai.html doesn't list server (URL) provided.

Thanks

Upvotes: 0

Views: 1102

Answers (1)

StephenKing
StephenKing

Reputation: 37620

The chef_server_url config setting is not available as a node attribute, but you can access this configuration via Chef::Config:

Chef::Config['chef_server_url']

Upvotes: 4

Related Questions