Commit 135ae662 authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

[FEATURE] Initial support of Ubuntu 16.04

parent bf0fd5bd
default['ubuntu_base']['locales'] = %w(en_GB.utf8 de_DE.utf8)
default['ubuntu_base']['timezone'] = 'Europe/Berlin'
\ No newline at end of file
default['ubuntu_base']['timezone'] = 'Europe/Berlin'
version = String(`awk '/DISTRIB_RELEASE=/' /etc/lsb-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]/./' | tr -d '\n'`)
if version === '16.04'
default['locales']['locale_file'] = '/etc/locale.gen'
end
......@@ -23,40 +23,56 @@
# THE SOFTWARE.
data_bag = data_bag_item('apps', 'global')
version = String(`awk '/DISTRIB_RELEASE=/' /etc/lsb-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]/./' | tr -d '\n'`)
log 'message' do
message 'Version12: ' + version
level :fatal
end
log 'message2' do
message 'Type: ' + version.inspect
level :fatal
end
#########################
### Update the system ###
#########################
# apt-get crashes if the directory isn't created before it's execution
# can be removed maybe later on
directory '/var/www/html' do
recursive true
action :create
if version != '16.04'
# apt-get crashes if the directory isn't created before it's execution
directory '/var/www/html' do
recursive true
action :create
end
end
execute 'apt-get -y update'
execute 'apt-get -y upgrade'
# no updated anymore as this can cause critical problems (better use a fresh updated box)
#execute 'apt-get -y upgrade'
###################
### Update ruby ###
###################
apt_repository('ruby-ng') do
uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu'
deb_src true
trusted true
keyserver 'keyserver.ubuntu.com'
key 'C3173AA6'
distribution 'trusty'
components [:main]
arch 'amd64,i386'
action :add
end
execute 'aptitude update'
if version === '16.04'
package 'ruby'
else
apt_repository('ruby-ng') do
uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu'
deb_src true
trusted true
keyserver 'keyserver.ubuntu.com'
key 'C3173AA6'
distribution 'trusty'
components [:main]
arch 'amd64,i386'
action :add
end
package 'ruby2.2', {:action => :upgrade}
package 'ruby2.2', {:action => :upgrade}
end
###########################
### Set system timezone ###
......@@ -80,12 +96,7 @@ include_recipe 'vim'
include_recipe 'build-essential'
include_recipe 'git'
include_recipe 'rsync'
%w(unzip).each do |name|
package name do
action :install
end
end
package 'unzip'
#################################################
### Fix the user/group id of the vagrant user ###
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment