浏览代码

nodejs role

master
父节点
当前提交
ee6672bc4f
共有 2 个文件被更改,包括 27 次插入0 次删除
  1. +2
    -0
      defaults/main.yaml
  2. +25
    -0
      tasks/main.yaml

+ 2
- 0
defaults/main.yaml 查看文件

@@ -1 +1,3 @@
---

nodejs_version: node_10.x

+ 25
- 0
tasks/main.yaml 查看文件

@@ -1 +1,26 @@
---

- name: requirements
apt:
pkg:
- apt-transport-https
- ca-certificates

- name: nodejs apt repository key
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
id: 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280

- name: nodejs apt repository
apt_repository:
repo: deb https://deb.nodesource.com/{{nodejs_version}} {{ansible_distribution_release}} main
filename: nodesource

- name: nodejs apt source repository
apt_repository:
repo: deb-src https://deb.nodesource.com/{{nodejs_version}} {{ansible_distribution_release}} main
filename: nodesource

- name: nodejs packages
apt:
pkg: nodejs

正在加载...
取消
保存