Hi
https://pythonhosted.org/Cheetah/
Try
#raw
#end raw
around your password line with $ in it.
--
Alastair Munro
-----Original Message-----
From: "Hymowitz, Eric B. (GSFC-444.0)[HONEYWELL TECHNOLOGY SOLUTIONS INC]"
<eric.b.hymowitz(a)nasa.gov>
To: "cobbler(a)lists.fedorahosted.org" <cobbler(a)lists.fedorahosted.org>
Sent: Mon, 19 Dec 2016 16:24
Subject: [cobbler] Variable extrapolation
Greetings.
I have two cobbler systems running 2.6.5 and 2.6.11, and both are exhibiting this same
behavior. I don't know if it's something I'm doing wrong, or just something I
don't understand.
My default kickstart calls a snippet called "set_password". The default
"set_password" snippet, located in /var/lib/cobbler/snippets/set_password ,
includes this line:
rootpw --iscrypted '$1$abcdef$abcdefghabcdefghabcdef'
That works fine. So far so good.
But when I take this same **exact** file and copy it to
/var/lib/cobbler/snippets/per_profile/set_password/support , then the snippet fails. It
is trying to expand the non-existent variables $abcdef and $abcdefghabcdefghabcdef . I
can verify this by changing the two dollar signs ($1 doesn't seem to be affected) and
the snippet loads properly.
So I guess my question is two-fold
Which is the correct behavior, in a single-quoted string that contains dollar signs?
Extrapolate the variable or don't?
Why is this behavior changing between a default snippet and a per-profile (also for a
per-system) snippet?
Thanks.
Eric B. Hymowitz
Systems Administrator
Solar Dynamics Observatory (SDO)
Eric.B.Hymowitz@nasa.gov<mailto:Eric.B.Hymowitz@nasa.gov>
301-286-6352