diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/install_workstation | 25 |
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 | |||
2 | CODE_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 | |||
10 | export FACTER_in_chroot=yes | ||
11 | export FACTER_workstation_name="$1" | ||
12 | |||
13 | if [ -z "$FACTER_workstation_name" ]; then | ||
14 | echo "Need to specify workstation name as first argument" | ||
15 | exit 1 | ||
16 | fi | ||
17 | |||
18 | git submodule update --init | ||
19 | |||
20 | pacman-key --init | ||
21 | pacman-key --populate archlinux | ||
22 | |||
23 | puppet 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 | ||
25 | puppet apply --environment workstation --tags base_installation --modulepath $CODE_PATH/modules:$CODE_PATH/external_modules --test $CODE_PATH/manifests/site.pp | ||