Skip to content

Commit

Permalink
ansible: use gcc 4.9 on Ubuntu 14.04
Browse files Browse the repository at this point in the history
  • Loading branch information
seishun authored and rvagg committed Nov 2, 2017
1 parent 45d87b0 commit 1a4efea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
17 changes: 8 additions & 9 deletions ansible/roles/baselayout/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,14 @@
- "{{ packages[os|stripversion]|default('[]') }}"
- "{{ common_packages|default('[]') }}"

#- name: update package alteratives
# when: os == debian7
# alterantives:
# loop_control:
# loop_var: gcc
# with_items:
# - gcc
# - g++
# - cc
- name: update package alternatives
when: os == "ubuntu1404"
alternatives: link=/usr/bin/{{ gcc }} name={{ gcc }} path=/usr/bin/{{ gcc }}-4.9
loop_control:
loop_var: gcc
with_items:
- gcc
- g++

- name: remove fortune from login shells
when: os|stripversion == 'freebsd'
Expand Down
12 changes: 12 additions & 0 deletions ansible/roles/baselayout/tasks/partials/repo/ubuntu1404.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

#
# add PPA for gcc 4.9
#

- name: "repo : add Ubuntu Toolchain PPA"
apt_repository:
repo: 'ppa:ubuntu-toolchain-r/test'
state: present
update_cache: yes
register: has_updated_package_repo
2 changes: 2 additions & 0 deletions ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@ packages: {

ubuntu1404: [
'ntp',
'g++-4.9',
'gcc-4.9',
]
}

0 comments on commit 1a4efea

Please sign in to comment.