Browse Source

Add a provision script to upgrade OS.

pull/2/head
Fabien Basmaison 3 months ago
parent
commit
a552295631
  1. 12
      Vagrantfile
  2. 5
      vagrant/root-upgrade-os.sh

12
Vagrantfile

@ -53,6 +53,13 @@ Vagrant.configure("2") do |config|
type: :shell,
path: "vagrant/root-os.sh"
# Upgrade box with root user.
# ===========================================================================
config.vm.provision 'upgrade-os',
type: :shell,
run: "never",
path: "vagrant/root-upgrade-os.sh"
# Provision with vagrant user.
# ===========================================================================
config.vm.provision 'spip',
@ -85,9 +92,8 @@ Vagrant.configure("2") do |config|
`date '+%H:%M'`: Done! \a
You can access the box with http://192.168.50.4/.
NB: From time to time, it wouldn’t hurt to do a \\\`vagrant ssh\\\`,
then \\\`sudo apt upgrade\\\` to upgrade all
packages.
NB: It wouldn’t hurt to run \\\`vagrant provision --provision-with upgrade-os\\\`
to upgrade all packages.
=========================================================================="
SHELL
end

5
vagrant/root-upgrade-os.sh

@ -0,0 +1,5 @@
#! /bin/bash
#
# This file is about upgrading the OS with the root user.
apt-get update && apt-get upgrade -y && apt-get autoremove && apt-get autoclean;
Loading…
Cancel
Save