upgrade local vagrant machines to ubuntu 14.04

This commit is contained in:
Raul Sanchez
2016-05-23 14:11:03 +02:00
parent aabbc17d97
commit a4970dbfd5
4 changed files with 20 additions and 28 deletions

View File

@@ -41,6 +41,7 @@ Virtualbox, Vagrant and Ansible
Run the following commands:
$ vagrant up
$ chmod 600 private-key
$ ansible-playbook provisioning.yml
And that's it! Now you should be able to ssh on `node1` using:

View File

@@ -25,7 +25,7 @@ Vagrant.configure('2') do |config|
check_dependency 'vagrant-vbguest'
config.vm.box = settings['default_box']
config.vm.box_url = settings['default_box_url']
# config.vm.box_url = settings['default_box_url']
config.ssh.forward_agent = true
config.ssh.insert_key = settings['ssh_insert_key']
config.vm.box_check_update = true

View File

@@ -3,6 +3,7 @@
sudo: true
vars_files:
- vagrant.yml
tasks:
- name: clean up the home folder
@@ -37,8 +38,7 @@
repo: "{{ item }}"
state: present
with_items:
- deb http://http.debian.net/debian wheezy-backports main
- deb https://apt.dockerproject.org/repo {{ ansible_lsb.id|lower }}-{{ ansible_lsb.codename }} main
- deb https://apt.dockerproject.org/repo ubuntu-trusty main
- name: installing docker
apt:
@@ -76,28 +76,16 @@
name: virtualenv
state: latest
- name: creating docker-compose folder
- name: Install Docker Compose via PIP
pip: name=docker-compose
- name:
file:
path: /opt/docker-compose
state: directory
register: docker_compose_folder
- name: creating virtualenv for docker-compose
shell: virtualenv /opt/docker-compose
when: docker_compose_folder is defined and docker_compose_folder.changed
- name: installing docker-compose
pip:
name: docker-compose
state: latest
virtualenv: /opt/docker-compose
- name: making the docker-compose command available to user
lineinfile:
dest: .bashrc
line: "alias docker-compose='/opt/docker-compose/bin/docker-compose'"
state: present
regexp: '^alias docker-compose=.*$'
path="/usr/local/bin/docker-compose"
state=file
mode=0755
owner=vagrant
group=docker
- name: building the /etc/hosts file with all nodes
lineinfile:
@@ -140,3 +128,5 @@
line: "127.0.0.1 localhost {{ inventory_hostname }}"
- regexp: '^127\.0\.1\.1'
line: "127.0.1.1 {{ inventory_hostname }}"

View File

@@ -1,8 +1,6 @@
---
vagrant:
default_box: debian-7.2.0
default_box_url: https://dl.dropboxusercontent.com/u/197673519/debian-7.2.0.box
default_box: ubuntu/trusty64
default_box_check_update: true
ssh_insert_key: false
min_memory: 256
@@ -12,7 +10,7 @@ instances:
- hostname: node1
private_ip: 10.10.10.10
memory: 512
memory: 1512
cores: 1
mounts:
- host_path: ../
@@ -39,3 +37,6 @@ instances:
private_ip: 10.10.10.50
memory: 512
cores: 1