Commit graph

7 commits

Author SHA1 Message Date
Nicolas Iooss
322ec10c43 Create vagrant user in vagrant group
The Vagrant documentation for option "group" in syncing folders states
(in https://www.vagrantup.com/docs/synced-folders/basic_usage.html#group):
"By default this will be the SSH user". Vagrant indeed tries to change
the owner and group of synchronized files to vagrant:vagrant (not
vagrant:users). It outputs:

    The following SSH command responded with a non-zero exit status.
    Vagrant assumes that this means the command failed!

    find /vagrant '!' -type l -a '(' ! -user vagrant -or ! -group vagrant
    ')' -exec chown vagrant:vagrant '{}' +

    Stdout from the command:

    Stderr from the command:

    find: 'vagrant' is not the name of an existing group

Fix this by using --user-group instead of --gid users in the useradd
command which creates user vagrant.
2016-11-13 10:29:12 -08:00
Tom Swartz
455dc90842 Move Provisioning to STDOUT
Previously, there was an issue with mkfs failing due to a missing
options flag; this error was difficult to catch, as it was only output
in the provisioned OS's virtual machine file.

This change moves the base installation steps to be more in line with
the other provisioning steps, and allows for any errors, issues, or
output to be cached in the logs of the interface running the Packer
build.
2016-11-07 17:53:19 -08:00
Aaron Bull Schaefer
f00a3026f4 Optimize the pacman database before zeroing the drive 2016-02-11 09:08:28 -08:00
Aaron Bull Schaefer
6c589e733a Remove the conditional on cleanup.sh
This should be desireable to run on any of the builders.
2016-02-11 08:00:09 -08:00
Mike Appleby
004b694ef6 Set the execute bit on cleanup.sh.
This isn't strictly necessary.  Done for consistency with the other
files in ./scripts.
2016-02-10 13:49:42 -06:00
Mike Appleby
fd57a360b7 Add a cleanup script.
Do a final clean of the pacman cache, then write zeros to disk and
unlink the file.  Packer will compact the disk as part of the build,
resulting in a smaller final image.
2016-02-09 20:53:33 -06:00
Aaron Bull Schaefer
d5adbc3f10 Remove duplication in installation scripts
Instead of having mostly duplicate scripts for the entire installation
process, we can split them up into the base installation steps and then
run shell provisioners for anything specific to each of the types after
the machine has rebooted.

This structure will mean less chance of error when making changes to
machines, and will also allow for expansion of the scripts to be run at
the end, such as adding a minimization script to remove history and
clear out space on the drive before compression.
2016-02-08 09:27:41 -08:00