Ask Your Question
0

Writing kv to consul with puppet [closed]

asked 2016-08-04 10:37:15 -0500

Here is my requirement: I need to write a value to consul through puppet - say $::hostname as the value to a key called vm_name in consul. How do i write to consul with puppet, do we have a puppet module which does that? In the consul docs, I see that there is a way to use curl command to write, I would like to know if there is any other module in forge which does that. Please provide examples. Thanks!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Redsmile
close date 2016-08-04 14:31:51.419622

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-08-04 11:39:21 -0500

DarylW gravatar image

I don't have a recommendation on how to write it out, other than by using the rest API, but remember one thing.. If you are using consul as a KV, and you end up with multiple nodes trying to manage the same key (if multiple nodes write out vm_name = $hostname), you would have them stepping on each other's toes.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-08-04 10:37:15 -0500

Seen: 28 times

Last updated: Aug 04 '16