aboutsummaryrefslogtreecommitdiff
path: root/bin/install_workstation
diff options
context:
space:
mode:
Diffstat (limited to 'bin/install_workstation')
-rwxr-xr-xbin/install_workstation25
1 files changed, 25 insertions, 0 deletions
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 @@
1
2CODE_PATH="/etc/puppetlabs/code"
3# Needs to be run manually
4# Mount /mnt, /mnt/boot, ...
5# pacstrap /mnt base git puppet
6# genfstab -U /mnt >> /mnt/etc/fstab
7# arch-chroot /mnt
8# git clone https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH
9
10export FACTER_in_chroot=yes
11export FACTER_workstation_name="$1"
12
13if [ -z "$FACTER_workstation_name" ]; then
14 echo "Need to specify workstation name as first argument"
15 exit 1
16fi
17
18git submodule update --init
19
20pacman-key --init
21pacman-key --populate archlinux
22
23puppet apply --environment workstation --tags base_installation --modulepath $CODE_PATH/modules:$CODE_PATH/external_modules --test $CODE_PATH/manifests/site.pp
24# The password seed requires puppet to be run twice
25puppet apply --environment workstation --tags base_installation --modulepath $CODE_PATH/modules:$CODE_PATH/external_modules --test $CODE_PATH/manifests/site.pp