Skip to content

Instantly share code, notes, and snippets.

@jkugler
Created August 22, 2014 20:44
Show Gist options
  • Save jkugler/0f65a22c0fef3dd91125 to your computer and use it in GitHub Desktop.
Save jkugler/0f65a22c0fef3dd91125 to your computer and use it in GitHub Desktop.
Exhibition of bug in per-(system|profile) templates
For example, we have this block:
if $is_service_node; then
cat > /etc/chef/solo.rb << EOF
file_cache_path "/var/tmp/chef-solo"
role_path "/var/tmp/chef-solo/roles"
data_bag_path "/var/tmp/chef-solo/bags"
cookbook_path "/var/tmp/chef-solo/cookbooks"
json_attribs "https://server/path/to/$solo_name"
recipe_url "https://server/path/to/cookbooks.tar.gz"
EOF
When used as a normal snippet, cobbler (or rather, cheetah) just leaves that alone and prints out $solo_name (with the $) in the kickstart. However, when used as per-system, I have to change that line to \$solo_name. Very odd.
@opoplawski
Copy link

Yeah, I always expect to have to quote $s. Not sure why it changes though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment