Skip to content

Commit 6d76604

Browse files
committed
Start rewrite provision to bash.
1 parent 959b3f5 commit 6d76604

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

Vagrantfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
Vagrant.configure(2) do |config|
2-
config.vm.box = "ubuntu/trusty32"
2+
config.vm.box = "hashicorp/precise32"
33

4-
config.vm.provision "ansible" do |ansible|
5-
ansible.playbook = "playbook.yml"
6-
ansible.groups = {
7-
"vagrant" => ["default"],
8-
}
9-
end
4+
config.vm.provision "shell", path: "scripts/deploy.sh"
105
end

scripts/deploy.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -e
2+
3+
# Create tramp user.
4+
5+
adduser test
6+
sudo -u test mkdir -p /home/test/.ssh
7+
cat $HOME/.ssh/id_rsa.pub | sudo -u test cat > /home/test/.ssh/authorized_keys
8+
9+
# Register tramp host.
10+
11+
ssh-keygen -t rsa -b 4096 -f $HOME/.ssh/id_rsa -N ''
12+
touch $HOME/.ssh/known_hosts
13+
ssh-keygen -R localhost
14+
ssh-keyscan -H localhost > $HOME/.ssh/known_hosts

0 commit comments

Comments
 (0)