Re: how to set specific information

Valérie GIVAUDAN <[email protected]>
Newsgroups gmane.linux.debian.fai
Message-ID <1377594801.268252494.1630575547696.JavaMail.zimbra@ijclab.in2p3.fr>
It helps thank you!
Valérie

-- 
Valérie Givaudan			Tel:  33 1 64 46 83 38
IJCLab Service Informatique	port: 33 6 71 37 08 06
CNRS, Université Paris-Saclay
Bât. 100, Faculté des Sciences, F-91405 Orsay Cedex

----- Mail original -----
De: "Carsten Aulbert" <[email protected]>
À: "Valérie GIVAUDAN" <[email protected]>
Cc: "fully automatic installation for Linux" <[email protected]>
Envoyé: Jeudi 2 Septembre 2021 11:22:18
Objet: Re: how to set specific information

Hi

On 02.09.21 11:16, Valérie GIVAUDAN wrote:
> Thank you for your answer.
> Yes I thought I could do this and so it pops up this question: FAi looks really very usefull but is it necessary to add in 50-host-classes every host I want to install ? I mean is there a way to read a file (for instance) with the different hosts name I want to install and fire FAI (instead of editing 50-host-classes )?

no, 50-host-classes is just for grouping your hosts into additional classes.

Depending on how you set the users, you could, for example, simply 
create  "scripts/DEFAULT/10_create_users.sh" script which does the following

case "$HOSTNAME" in
   name1) USERNAME=user1;;
   name2) USERNAME=user2;;
   *) USERNAME=''
esac

if [[ -z "$USERNAME" ]]
then
   adduser "$USERNAME" .....
fi


(Obviously probably too short script, but I hope that will help getting 
started - does it?)

Cheers

Carsten
-- 
Dr. Carsten Aulbert, Max Planck Institute for Gravitational Physics,
Callinstraße 38, 30167 Hannover, Germany, Phone +49 511 762 17185
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.