Skip to content

Instantly share code, notes, and snippets.

@attachmentgenie
Created October 29, 2020 11:15
Show Gist options
  • Save attachmentgenie/b1b9810426c49e0f92a9b69dd9bbb3f7 to your computer and use it in GitHub Desktop.
Save attachmentgenie/b1b9810426c49e0f92a9b69dd9bbb3f7 to your computer and use it in GitHub Desktop.
turn hcl in to ruby object
source 'https://rubygems.org' do
gem 'hcl-checker'
end
require 'hcl1/checker'
require 'json'
contents = HCL1::Checker.parse(File.read("nomad.hcl"))
puts JSON.dump(contents)
client {
host_volume "ca-certificates" {
path = "/etc/ssl/certs"
read_only = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment