CODE_PATH="/etc/puppetlabs/code" # Needs to be run manually # Mount /mnt, /mnt/boot, ... # pacstrap /mnt base git puppet # genfstab -U /mnt >> /mnt/etc/fstab # arch-chroot /mnt # git clone https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH export FACTER_in_chroot=yes export FACTER_workstation_name="$1" if [ -z "$FACTER_workstation_name" ]; then echo "Need to specify workstation name as first argument" exit 1 fi git submodule update --init pacman-key --init pacman-key --populate archlinux puppet apply --environment workstation --tags base_installation --modulepath $CODE_PATH/modules:$CODE_PATH/external_modules --test $CODE_PATH/manifests/site.pp # The password seed requires puppet to be run twice puppet apply --environment workstation --tags base_installation --modulepath $CODE_PATH/modules:$CODE_PATH/external_modules --test $CODE_PATH/manifests/site.pp