Advertisement
Guest User

Untitled

a guest
Feb 17th, 2015
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. ### hieradata yaml
  2. class::myvar:
  3. aaa:
  4. - a.1
  5. - a.2
  6. bbb:
  7. - b.1
  8. - b.2
  9. ccc:
  10. - c.1
  11. - c.2
  12.  
  13. # initializing the class like:
  14. $myvar = hiera_hash('class::myvar', 'dummy-value' )
  15.  
  16. ## configuration.erb
  17.  
  18. myline = <%=
  19. @myvar.sort.each do |key, value|
  20. "{key} {value}"
  21. end
  22. %>
  23.  
  24.  
  25. ## I get:
  26.  
  27. myline = aaaa.1a.2bbbb.1b.2cccc.1c.2
  28.  
  29. ## how I want
  30.  
  31. myline = aaa = a.1,a.2 ; bbb = b.1, b.2 ; ccc = c.1, c.2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement