Is there a reason why the macro is @@server@@ is using @@ instead of the
$'s that are used in all other macro's? E.g. the @@server@@ could become $cobbler_server:$cobbler_ro_port to be consistent.
It's a bit of a weird reason, but there's a reason. This may be a bit confusing but I'll elaborate:
In the case of cobbler import we expand the variable "$tree" in the kickstart. The problem is the output of this expansion needs to include a variable in order to allow the cobbler --server-override parameter to work (and indeed, in order to allow cobbler replicate to work). Running Cheetah twice on the same file would be a trainwreck as it would evaluate bash as Cheetah even if included in #raw blocks, so instead we choose another variable substitution and do this manually just after the Cheetah run.
So our templating engine is Cheetah /plus/ a bit more, rather than just running Cheetah twice.
For things that do not involve double substitution, using "$foo" works fine, and everyone else should just use $foo. @@foo@@ should be reserved for Cobbler internals and that weird case above.
Basically if a variable is to be expanded and also needs to be saved in a cobbler object /unexpanded/, this is where the "@@" stuff comes in. I could have chosen any other syntax, it's just that syntax was sufficiently weird it would not be an escaping problem.
Understand, maybe it good to add this explanation and a list of internal @@-variables to the KickstartTemplating page.
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.