Created
October 29, 2020 11:15
-
-
Save attachmentgenie/b1b9810426c49e0f92a9b69dd9bbb3f7 to your computer and use it in GitHub Desktop.
turn hcl in to ruby object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' do | |
gem 'hcl-checker' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'hcl1/checker' | |
require 'json' | |
contents = HCL1::Checker.parse(File.read("nomad.hcl")) | |
puts JSON.dump(contents) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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