How to populate a ruby/erubis/erb template from a command line

Template test.erb:

# DESCRIPTORS

account      = “<%= account %>”

ownerorg     = “<%= org %>”

application  = “<%= application %>”

region       = “<%= region %>”

environment  = “<%= environment %>”

service      = “<%= service %>”

node_name_id = “<%= taxonomy %>”

version   = “<%= version %>”

# Populate with values:

erb key=value key=value template.erb

erb account=12 org=23 application=34 region=45 environment=56 service=67 taxonomy=89 version=fred test.erb

# DESCRIPTORS

account      = “12”

ownerorg     = “23”

application  = “34”

region       = “45”

environment  = “56”

service      = “67”

node_name_id = “89”

version   = “fred”

Leave a Reply

Your email address will not be published. Required fields are marked *