Skip to content

Commit

Permalink
Fix Ansible warnings
Browse files Browse the repository at this point in the history
Add support for Ubuntu 18.04 and Debian 9 and drop support for Ubuntu 12.04 and Debian 7
  • Loading branch information
tersmitten committed Nov 30, 2018
1 parent 6cdbaba commit cd9767d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 21 deletions.
14 changes: 0 additions & 14 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ role = File.basename(File.expand_path(File.dirname(__FILE__)))


boxes = [
{
:name => "ubuntu-1204",
:box => "bento/ubuntu-12.04",
:ip => '10.0.0.11',
:cpu => "50",
:ram => "256"
},
{
:name => "ubuntu-1404",
:box => "bento/ubuntu-14.04",
Expand All @@ -33,13 +26,6 @@ boxes = [
:cpu => "50",
:ram => "256"
},
{
:name => "debian-7",
:box => "bento/debian-7",
:ip => '10.0.0.15',
:cpu => "50",
:ram => "256"
},
{
:name => "debian-8",
:box => "bento/debian-8",
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# defaults file for nodejs
---
nodejs_version: 'nodejs-v6x'
nodejs_version: 'nodejs-v8x'

nodejs_install:
# To compile and install native addons from npm you may also need to install build tools
Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# meta file for nodejs
---
galaxy_info:
role_name: nodejs
author: Mischa ter Smitten
company: Oefenweb.nl B.V.
description: Set up the latest version of Node.js and npm in Debian-like systems
Expand Down
10 changes: 5 additions & 5 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
---
- name: install dependencies
apt:
name: "{{ item }}"
name: "{{ nodejs_dependencies }}"
state: "{{ apt_install_state | default('latest') }}"
update_cache: true
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}"
with_items: "{{ nodejs_dependencies }}"
tags:
- configuration
- nodejs
Expand All @@ -15,19 +14,20 @@

- name: install additional
apt:
name: "{{ item }}"
name: "{{ nodejs_install }}"
state: "{{ apt_install_state | default('latest') }}"
with_items: "{{ nodejs_install }}"
tags:
- configuration
- nodejs
- nodejs-install
- nodejs-install-additional

- name: add repository and install its signing key
shell: curl -sL https://deb.nodesource.com/setup_{{ nodejs_version_map[nodejs_version] }} | bash -
shell: >
curl -sL https://deb.nodesource.com/setup_{{ nodejs_version_map[nodejs_version] }} | bash -
args:
creates: /etc/apt/sources.list.d/nodesource.list
warn: false
tags:
- configuration
- nodejs
Expand Down
2 changes: 1 addition & 1 deletion tests/post.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# post test file for nodejs
---
- name: Run tests
- name: run tests
command: "{{ item }}"
changed_when: false
with_items:
Expand Down

0 comments on commit cd9767d

Please sign in to comment.