Ask Your Question
0

Best way to mark your node to specific datacenter

asked 2014-12-29 05:32:18 -0600

confiq gravatar image

I'm having 4 datacenter, I must know which nodes is physically located to which datacenter. The only way to know for sure is by IP address and submasks/network.

The question is, which is best way to mark a node to specific DC? The only solutions that comes to my mind is to use custom facts but i might ask here as well.

Regards

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-12-29 14:39:20 -0600

GregLarkin gravatar image

A custom fact is absolutely the way to do what you're looking for. Here is a similar example where some data needs to be parsed to create a custom fact value. It should be easily adapted to your scenario:

http://stackoverflow.com/questions/25654478/how-can-i-create-a-custom-host-role-fact-from-the-hostname

edit flag offensive delete link more

Comments

thanks. will probably make something sweet in ruby

confiq gravatar imageconfiq ( 2014-12-30 03:30:34 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-12-29 05:32:18 -0600

Seen: 45 times

Last updated: Dec 29 '14