Re: 50-host-classes
Hi Marc, On Tue, 2022-04-26 at 14:27 +, Marc Hoppins via linux-fai wrote: > The documentation leads one to the opinion that all hosts sit in the > 50- file which makes it very unwieldy. You can split it up into whatever files you want. You'll just want to be careful if you have multiple files that match as the last match would be what is used. FAI processes the files in the class directory in shell sorting order. We also use multiple Perl scripts that perform a regexes on the hostname and sets classes that way. One script perl per cluster type or customer. Cheers, Andrew -- Andrew Ruthven, Wellington, New Zealand and...@etc.gen.nz | Catalyst Cloud: | This space intentionally left blank https://catalystcloud.nz |
RE: 50-host-classes
Diese Nachricht wurde eingewickelt um DMARC-kompatibel zu sein. Die eigentliche Nachricht steht dadurch in einem Anhang. This message was wrapped to be DMARC compliant. The actual message text is therefore in an attachment.--- Begin Message --- HI, Juri, I don't see how that works, the hostname is going to end up being the hostname of the FAI server, isn't it? -Original Message- From: Juri Grabowski Sent: Tuesday, April 26, 2022 5:08 PM To: fully automatic installation for Linux Cc: Marc Hoppins Subject: Re: 50-host-classes EXTERNAL Hello, Maybe you are looking for something like that: #! /bin/bash MYDOMAINNAME=$(hostname -d) MYFQDN=$(hostname -f) case $MYFQDN in fqdnhost.example.com) echo "EXAMPLECLASS1" ;; *) echo "FAIBASE DEBIAN DEMO" ;; esac case $MYDOMAINNAME in mydemodomain2.example.com) echo -en "DOMCLASS2 " case $HOSTNAME in demohost|client*) echo "EXAMPLECLASS2" ;; *) echo "FAIBASE DEBIAN DEMO" ;; esac ;; mydemodomain3.example.com) case $HOSTNAME in demohost|client*) echo "EXAMPLECLASS3" ;; *) echo "FAIBASE DEBIAN DEMO" ;; esac ;; esac Best Regards, gratuxri --- End Message ---
50-host-classes
Diese Nachricht wurde eingewickelt um DMARC-kompatibel zu sein. Die eigentliche Nachricht steht dadurch in einem Anhang. This message was wrapped to be DMARC compliant. The actual message text is therefore in an attachment.--- Begin Message --- HI, Same question as in StackOverflow: Fully Automated Install (FAI) has hosts in the file 50-host-classes. We currently have a bunch of hosts which have similar names (eg, ba-hostxx.subdomain). The sub-domains are different but one cannot specify host.subdomain in the class file as the '.' is invalid. However it was setup originally, it has morphed over time and we have ba-w6* ba-w7* ba-w* dr1-w4* dr1-w6* dr1-w7* dr1-w* and so on Is it possible to have different hosts in different files? Or to specify the host in some other fashion than just hostname*) echo "BASEFILE FILE" ;; such as cluster/hostname*) echo "BASEFILE FILE" ;; ? The documentation leads one to the opinion that all hosts sit in the 50- file which makes it very unwieldy. Thanks --- End Message ---