From 98a071604ea9f7569aa0fa0688bc9d35081770c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 2 Oct 2018 22:53:29 +0200 Subject: Add Flony workstation --- bin/install_workstation | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 bin/install_workstation (limited to 'bin') diff --git a/bin/install_workstation b/bin/install_workstation new file mode 100755 index 0000000..8e0aadf --- /dev/null +++ b/bin/install_workstation @@ -0,0 +1,25 @@ + +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 -- cgit v1.2.3