Add insecure Vagrant default key, set a default root password, update Ansible submodule, prepare Vagrant tests

This commit is contained in:
Moritz Heiber 2017-04-17 22:19:32 +02:00
parent b51d6b0176
commit 11e58921d9
5 changed files with 25 additions and 8 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/builds
/packer_cache
/.vagrant

5
Vagrantfile vendored Normal file
View File

@ -0,0 +1,5 @@
Vagrant.configure('2') do |config|
config.vm.box = 'builds/virtualbox-mastodon-ubuntu1604.box'
config.vm.box_check_update = true
config.vm.network 'private_network', type: 'dhcp'
end

@ -1 +1 @@
Subproject commit 92e4cdddbc402922b99f7b6cadab858f2bdbed0b
Subproject commit cc8b0b3d51baf2e9eabf7fd0d8e31caa6eb596b7

View File

@ -1,8 +1,14 @@
{
"variables": {
"user": "vagrant",
"password": "vagrant"
},
"provisioners": [
{
"type": "ansible",
"playbook_file": "ansible/playbook.yml"
{ "type": "shell",
"inline": [
"install -m0700 -o {{user `user`}} -g {{user `user`}} -d /home/{{user `user`}}/.ssh",
"curl -SsL https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/{{user `user`}}/.ssh/authorized_keys"
]
}
],
"builders": [
@ -42,8 +48,8 @@
"iso_urls": "http://releases.ubuntu.com/16.04/ubuntu-16.04.2-server-amd64.iso",
"iso_checksum_type": "sha256",
"iso_checksum": "737ae7041212c628de5751d15c3016058b0e833fdc32e7420209b76ca3d0a535",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `user`}}",
"ssh_wait_timeout": "20m",
"shutdown_command": "echo 'vagrant'|sudo -S shutdown -P now",
"vm_name": "packer-ubuntu-16.04-amd64",

View File

@ -16,7 +16,7 @@ d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/confirm_write_new_label boolean true
d-i pkgsel/include string openssh-server linux-source dkms nfs-common
d-i pkgsel/include string openssh-server linux-source dkms nfs-common curl
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select none
d-i pkgsel/upgrade select full-upgrade
@ -28,7 +28,12 @@ d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/modelcode string pc105
d-i debian-installer/locale string en_US
# Create vagrant user account.
# Set the root password
d-i passwd/root-login boolean true
d-i passwd/root-password password vagrant
d-i passwd/root-password-again password vagrant
# Setup the user account
d-i passwd/user-fullname string vagrant
d-i passwd/username string vagrant
d-i passwd/user-password password vagrant