Apologies there should have been a single quotes in the previous email on this line:
$SNIPPET(‘Version1/common/security/login_configuration’)
From: cobbler-bounces@lists.fedorahosted.org [mailto:cobbler-bounces@lists.fedorahosted.org] On Behalf Of Madden, Joe
Sent: 19 November 2013 10:16
To: cobbler mailing list
Subject: Re: [cobbler] Cobbler/Snippet Query
Hi all,
Upon further investigation I believe I have found a limitation with snippets and the way it references variables within the $SNIPPET function.
As the instructions say when referencing variables within the SNIPPET function you do not have to use single quotes.
When using single quotes the cheetah interpreter will not change this viable to text/version number in my case.
We can get around this by using this by either entering the full path within the kickstart metadata like so:
cobblersnippetver=Version1/common/security/login_configuration
and reference it in the kick start like so:
$SNIPPET($cobblersnippetver)
Unfortunately I suspect this will become highly complex to manage therefore I think our solution will be to reference the absolute paths.
$SNIPPET(Version1/common/security/login_configuration)
It means the Kickstart will be slightly more complex to manage but much simpler than managing 30+virables for each Kickstart.
Cheers
Joe.
From: cobbler-bounces@lists.fedorahosted.org [mailto:cobbler-bounces@lists.fedorahosted.org] On Behalf Of Madden, Joe
Sent: 18 November 2013 14:55
To: cobbler mailing list
Subject: Re: [cobbler] Cobbler/Snippet Query
Hi,
I’ve set version using the Kickstart metadata, It does pick up the if I run something like /bin/echo $version which allows me to see it in the anaconda.log
I’ve tried the following:
$SNIPPET('$cobblersnippetver/common/security/login_configuration')
Which provides no error but the snippet does not run and no output in produced. I believe that $cobblersnippetver is not being converted from the viable.
$SNIPPET($cobblersnippetver/common/security/login_configuration)
This produces an error in the log of a syntax error.
Do you mean It should be call using the first example above?
As the Github cobbler instructions say otherwise
https://github.com/cobbler/cobbler/wiki/Kickstart%20snippets
Cheers
Joe
From: cobbler-bounces@lists.fedorahosted.org [mailto:cobbler-bounces@lists.fedorahosted.org] On Behalf Of James Cammarata
Sent: 18 November 2013 14:46
To: cobbler mailing list
Subject: Re: [cobbler] Cobbler/Snippet Query
There is no limit, but how are you setting $version? Variables in snippet names should work fine (but it should be quoted, ie. $SNIPPET('$version/snippet1))
On Mon, Nov 18, 2013 at 8:38 AM, Madden, Joe <Joe.Madden@mottmac.com> wrote:
Hi all,
I have been playing with snippets for some time now and understand the basics and have had it working.
The Challenge comes where I am trying to ensure that there are versioning between each version of our common snippets that will allow different profiles to use different versions.
I assumed the easiest way to do this would be to only use the subdirectory version of the snippets which would contain a version number, therefore the profile would only ever pick the common snippets from its own version.
For Example:
Common1 Common2
Snippet1 Snippet1
Unfortunately when referencing the $version within the $SNIPPET($version/snippet1) is does not work. Is there a maximum number of subdirectories that snippets can be in?
Cheers
Joe
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler