This repository has been archived by the owner on Jan 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# io.js Ansible Role for Debian and Ubuntu | ||
|
||
Setup [io.js](https://iojs.org/) repository and install binary package [provided by Nodesource](https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories). | ||
|
||
## Supported Distributions | ||
|
||
Only the latest versions of Ubuntu and Debian are supported by Nodesource. | ||
|
||
Ubuntu since version 14.04 (trusty). | ||
|
||
Debian since Jessie. | ||
|
||
## Requirements | ||
|
||
The role uses [apt_repository module](http://docs.ansible.com/apt_repository_module.html) which has additional dependencies. You can use [bootstrap-debian](https://github.com/cederberg/ansible-bootstrap-debian) role to setup common Ansible requirements on Debian-based systems. | ||
|
||
Furthermore the repository uses HTTPS, so make sure package `apt-transport-https` is available on your system. | ||
|
||
## Role Variables | ||
|
||
- `iojs_version`: Version of the io.js package to install. | ||
- Default: `"1.8.*"` | ||
- **Note**: Package version contains suffix, so make sure to always end the version specification with asterisk, e.g. `1.8.1*` | ||
- `iojs_repo_base`: Base URL for the package repository. | ||
- Default: `"https://deb.nodesource.com/iojs_1.x"` | ||
- `iojs_repo_key_url`: Repository GPG key to install. | ||
- Default: `"https://deb.nodesource.com/gpgkey/nodesource.gpg.key"` | ||
- `iojs_repo_key_id`: ID of the GPG key to be installed to prevent needless download. | ||
- Default: `"1655A0AB68576280"` | ||
|
||
## Example Playbook | ||
|
||
- hosts: servers | ||
roles: | ||
- { role: jnv.iojs-debian } | ||
|
||
## License | ||
|
||
[![CC0 Public Domain](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
# defaults file for iojs-debian | ||
iojs_version: 1.8.* | ||
iojs_repo_base: https://deb.nodesource.com/iojs_1.x | ||
iojs_repo_key_url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key | ||
iojs_repo_key_id: "1655A0AB68576280" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
# handlers file for iojs-debian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
galaxy_info: | ||
author: Jan Vlnas | ||
description: Setup io.js with repository from Nodesource | ||
license: CC0 | ||
min_ansible_version: 1.6 | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- trusty | ||
- vivid | ||
- utopic | ||
- name: Debian | ||
versions: | ||
- jessie | ||
- sid | ||
categories: | ||
- development | ||
- system | ||
dependencies: [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
# tasks file for iojs-debian | ||
|
||
- name: Setup Nodesource GPG key | ||
apt_key: | ||
url: "{{iojs_repo_key_url}}" | ||
id: "{{iojs_repo_key_id}}" | ||
state: present | ||
|
||
- name: Add the Nodesource repository | ||
apt_repository: | ||
# 'deb https://deb.nodesource.com/iojs_1.x ${DISTRO} main' | ||
repo: "deb {{iojs_repo_base}} {{ansible_distribution_release}} main" | ||
state: present | ||
update_cache: yes | ||
|
||
- name: Install the iojs package | ||
apt: | ||
name: "iojs={{iojs_version}}" | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
# vars file for iojs-debian |