Skip to content

Commit a0c50a7

Browse files
committed
Upgrade to Ubuntu 16.04 (Xenial) LTS base image
1 parent 3d6ba6b commit a0c50a7

File tree

6 files changed

+32
-28
lines changed

6 files changed

+32
-28
lines changed

Vagrantfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
1313
v.memory = 2048
1414
v.cpus = 2
1515
end
16-
vbox.vm.box = "ubuntu/trusty64"
16+
vbox.vm.box = "ubuntu/xenial64"
1717
vbox.vm.network "forwarded_port", guest: 80, host: 8080
1818
vbox.vm.network "forwarded_port", guest: 5050, host: 5050
1919
vbox.vm.provision :ansible do |ansible|

playbook.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
- hosts: all
33
become: true
44
vars:
5-
home: /home/vagrant
5+
home: /home/ubuntu
66
document_root: /vagrant
77
os: ubuntu
8-
osversioncode: trusty
8+
user: ubuntu
9+
osversioncode: xenial
10+
gather_facts: no
911
pre_tasks:
12+
- name: 'install python2'
13+
raw: sudo apt-get -y install python-simplejson
1014
- name: Symlink sh to bash rather than dash
1115
file: src=/bin/bash dest=/bin/sh state=link force=true
1216
- name: Update apt cache and optionally upgrade

roles/dotfiles/files/.bashrc_mods

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ -f ~/.bash_aliases_local ]; then
1616
fi
1717

1818
export PS1="[\u \W]$ "
19-
export GOROOT=/home/vagrant/opt/go
20-
export GOPATH=/home/vagrant/code/go
21-
export PATH=/home/vagrant/opt/go/bin:$PATH
22-
export PATH=/home/vagrant/code/go/bin:$PATH
19+
export GOROOT=~/opt/go
20+
export GOPATH=~/code/go
21+
export PATH=~/opt/go/bin:$PATH
22+
export PATH=~/code/go/bin:$PATH

roles/dotfiles/tasks/main.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
22
- name: Symlink config files in rc folder
3-
file: src=/vagrant/roles/dotfiles/files/{{ item }} dest=/home/vagrant/{{ item }} state=link
3+
file: src=/vagrant/roles/dotfiles/files/{{ item }} dest={{ home }}/{{ item }} state=link
44
with_items:
55
- .bashrc_mods
66
- .bash_aliases
77
- .tmux.conf
88
- .vimrc
99
- .vim
1010
- name: Create ~/src folder
11-
file: dest=/home/vagrant/src/vim-pathogen state=directory
11+
file: dest={{ home }}/src/vim-pathogen state=directory
1212
- name: Check out pathogen
1313
git:
1414
repo=https://github.com/tpope/vim-pathogen.git
15-
dest=/home/vagrant/src/vim-pathogen
15+
dest={{ home }}/src/vim-pathogen
1616
update=yes
1717
- name: Create /vagrant/roles/dotfiles/files/.vim/autoload folder
1818
file: dest=/vagrant/roles/dotfiles/files/.vim/autoload state=directory
1919
- name: Symlink pathogen into ~/.vim/autoload
2020
file:
21-
src=/home/vagrant/src/vim-pathogen/autoload/pathogen.vim
22-
dest=/home/vagrant/.vim/autoload/pathogen.vim
21+
src={{ home }}/src/vim-pathogen/autoload/pathogen.vim
22+
dest={{ home }}/.vim/autoload/pathogen.vim
2323
state=link
2424
- name: Create empty .bash_aliases_local file
2525
shell:
26-
echo '# Add local aliases here' > /home/vagrant/.bash_aliases_local
27-
creates=/home/vagrant/.bash_aliases_local
26+
echo '# Add local aliases here' > {{ home }}/.bash_aliases_local
27+
creates={{ home }}/.bash_aliases_local
2828
- name: Include .bashrc_mods in .bashrc
2929
lineinfile:
30-
"dest=/home/vagrant/.bashrc line='. ~/.bashrc_mods # Include local mods' insertafter=EOF"
30+
"dest={{ home }}/.bashrc line='. ~/.bashrc_mods # Include local mods' insertafter=EOF"

roles/golang/tasks/main.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
dest={{ document_root }}/{{ go_archive_file }}
1111
- name: Create ~/opt folder
1212
file:
13-
path=/home/vagrant/opt
13+
path={{ home }}/opt
1414
state=directory
1515
- name: Unpack the Go binary distribution
1616
unarchive:
1717
copy=no
1818
src={{ document_root }}/{{ go_archive_file }}
19-
dest=/home/vagrant/opt
20-
creates=/home/vagrant/opt/go
19+
dest={{ home }}/opt
20+
creates={{ home }}/opt/go
2121
- name: Add go path settings in .bashrc_mods
22-
lineinfile: dest=/home/vagrant/.bashrc_mods line="{{ item }}" insertafter=EOF
22+
lineinfile: dest={{ home }}/.bashrc_mods line="{{ item }}" insertafter=EOF
2323
with_items:
2424
- 'export GOROOT={{ go_root }}'
2525
- 'export GOPATH={{ go_path }}'
@@ -30,8 +30,8 @@
3030
dest={{ go_path }}/src/github.com
3131
state=directory
3232
recurse=yes
33-
owner=vagrant
34-
group=vagrant
33+
owner={{ user }}
34+
group={{ user }}
3535
- name: Install some nice go packages
3636
command: >
3737
go get -u {{ item }}
@@ -45,15 +45,15 @@
4545
- name: Check out vim-go
4646
git:
4747
repo=https://github.com/fatih/vim-go.git
48-
dest=/home/vagrant/src/vim-go
48+
dest={{ home }}/src/vim-go
4949
update=yes
5050
- name: Ensure ~/.vim/bundle exists
5151
file:
52-
dest=/home/vagrant/.vim/bundle
52+
dest={{ home }}/.vim/bundle
5353
state=directory
5454
- name: Symlink vim-go to .vim/bundle
5555
file:
56-
src=/home/vagrant/src/vim-go
57-
dest=/home/vagrant/.vim/bundle/vim-go
56+
src={{ home }}/src/vim-go
57+
dest={{ home }}/.vim/bundle/vim-go
5858
state=link
5959
# TODO: Add bitbucket.org/gotamer/gowatch for folder watching and running tests!

roles/golang/vars/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
go_version: 1.8
33
go_archive_file: go{{ go_version }}.linux-amd64.tar.gz
4-
go_binary: /home/vagrant/opt/go/bin/go
5-
go_root: /home/vagrant/opt/go
6-
go_path: /home/vagrant/code/go
4+
go_binary: /home/ubuntu/opt/go/bin/go
5+
go_root: /home/ubuntu/opt/go
6+
go_path: /home/ubuntu/code/go

0 commit comments

Comments
 (0)