Tim Edwards wrote:
I'm finding this a bit confusing, the RHEL documentation says:
"Use the %include /path/to/file command to include the contents of
another file in the kickstart file as though the contents were at the
location of the %include command in the kickstart file."
Yes, but the file has to exist, whether locally or from a mounted remote
location before you can include it...
What would be the point of the %include statement if it doesn't in fact
do this? I mean I could try jumping through hoops in the %pre section
but surely this is just providing the functionality that the %include
statement's mean to give automatically.
Or does it work better with kickstart files made available over http
or ftp?
No, because while you don't have to do an NFS mount, you will have to
wget the files you want to include in the %pre section into somewhere on
the local filesystem so that Anaconda can include them. You could
include your kickstart files in a custom install.img in which case you
wouldn't need a complex %pre section as you can include the files which
already exist in that filesystem, but most people I've talked to don't
seem to do it that way.
Our kickstart include files are available over http, and in the %pre
section, we grab them with wget. The advantage is that we can have a
specific overall kickstart file for a machine or group of machines, but
we can maintain the sections that are common to all machines separately.
Typically this might involve the root password or installation key being
set in the overall kickstart but the %packages section simply contains a
common set of packages which are set with an %include.
Our kickstarts are a bit complicated because we first use wget to grab
some details of the machine from a central database and process that
information to make decisions about what to include. For example, a
kickstart might %include /tmp/packagelist.ks but which particular common
package list we wget and from what location is a decision made during
the %pre section based on what the type of the machine is.
Your kickstart might simply contain:
<snip>
%pre
wget -q -O-
http://installserver.you.domain/path/to/kickstarts/packagelist.ks >
/tmp/packagelist.ks
<snip>
%packages
%include /tmp/packagelist.ks
<snip>
Now that doesn't seem like jumping through hoops to me...
--
Sam
Regards
Tim
Olt, Joseph wrote:
> Tim,
>
>
>
> As Rigoberto has indicated, you will need to do some %pre processing.
> Either having the %pre script create the template_stuff.ks or you need
> to “mkdir /something” and “mount -r -o nolock <serverIP>:/share
> /something”. Then you could access template_stuff.ks. The problem you
> have is that the kickstart script is retrieved. Once retrieved, you
> cannot reference that location directly.
>
>
>
> Regards,
>
>
>
> Joseph
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list