Skip to content

Commit

Permalink
Updates vagrant and ansible scripts.
Browse files Browse the repository at this point in the history
As https://bugs.launchpad.net/cloud-images/+bug/1569237 is now fixed, we
can use the official Ubuntu Xenial 16.04 box.

The sudo attribute of ansible scripts now longer works so we use a
workaround by using become become_user, become_method attributes.
  • Loading branch information
s-vincent committed Apr 28, 2018
1 parent f57b03d commit f240e4d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
4 changes: 1 addition & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# fixes 'Inappropriate ioctl for device'
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
# 'official' Ubuntu box does not have vagrant user (https://bugs.launchpad.net/cloud-images/+bug/1569237)
# so use another box as specified in issue
config.vm.box = "bento/ubuntu-16.04"
config.vm.box = "ubuntu/xenial64"
config.vm.provision 'Initial setup', type: 'shell', path: "provisioning/scripts/setup.sh"

config.vm.define 'load-test' do |machine|
Expand Down
8 changes: 6 additions & 2 deletions provisioning/roles/apt/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
- name: Update the APT repository
apt: update_cache=yes
sudo: True
become: yes
become_method: sudo
become_user: root
tags:
- needs_internet_connection

- name: Upgrade the packages
apt: upgrade=full
sudo: True
become: yes
become_method: sudo
become_user: root
tags:
- needs_internet_connection
4 changes: 3 additions & 1 deletion provisioning/roles/freelan-build/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
- help2man
tags:
- build
sudo: True
become: yes
become_method: sudo
become_user: root

- name: Checkout freelan sources
git: repo={{ local_sources_root }} dest={{ sources_root }} version={{ repository_version }} accept_hostkey=yes recursive=no
Expand Down
4 changes: 3 additions & 1 deletion provisioning/roles/freelan-load-test/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
- gdb
- valgrind
- screen
sudo: True
become: yes
become_method: sudo
become_user: root

- name: Create nodes configuration directory
file: dest={{ nodes_config_root }} state=directory
Expand Down
4 changes: 3 additions & 1 deletion provisioning/roles/freelan-speed-test/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
with_items:
- screen
- iperf
sudo: True
become: yes
become_method: sudo
become_user: root

- name: Create configuration directory
file: dest={{ config_root }} state=directory
Expand Down

0 comments on commit f240e4d

Please sign in to comment.