From ed447da3eb7b585368a50e460e125827e9d0e010 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 9 Aug 2018 13:18:46 -0300 Subject: [PATCH] Issue #265: Add Yarn Signed-off-by: Tomas Cohen Arazi --- roles/kohadevbox/tasks/main.yml | 2 +- roles/kohadevbox/tasks/{less.yml => node.yml} | 17 ++++++++++++----- vars/defaults.yml | 2 ++ vars/user.yml.sample | 2 ++ 4 files changed, 17 insertions(+), 6 deletions(-) rename roles/kohadevbox/tasks/{less.yml => node.yml} (57%) diff --git a/roles/kohadevbox/tasks/main.yml b/roles/kohadevbox/tasks/main.yml index 7ff57f6..9dee01f 100644 --- a/roles/kohadevbox/tasks/main.yml +++ b/roles/kohadevbox/tasks/main.yml @@ -38,7 +38,7 @@ become: yes when: elasticsearch - - include: less.yml + - include: node.yml become: yes - include: remote-debugger.yml diff --git a/roles/kohadevbox/tasks/less.yml b/roles/kohadevbox/tasks/node.yml similarity index 57% rename from roles/kohadevbox/tasks/less.yml rename to roles/kohadevbox/tasks/node.yml index 4d87f8f..58a1993 100644 --- a/roles/kohadevbox/tasks/less.yml +++ b/roles/kohadevbox/tasks/node.yml @@ -1,26 +1,33 @@ -- name: Less | Add Node.js repository (key) +- name: Node | Add Node.js repository (key) apt_key: url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" state: present -- name: Less | Add Node.js repository (repo) +- name: Node | Add Node.js repository (repo) apt_repository: repo: "deb https://deb.nodesource.com/{{ node_version }} {{ ansible_distribution_release }} main" state: present -- name: Less | Instal Node.js +- name: Node | Instal Node.js apt: name: nodejs state: latest -- name: Less | Install Less globally +- name: Node | Install Yarn + npm: + name: yarn + global: yes + +- name: Node | Install Less npm: name: less version: '2.7.3' global: yes + when: less -- name: Less | Install the Clean CSS plugin for Less globally +- name: Node | Install the Clean CSS plugin for Less npm: name: less-plugin-clean-css global: yes + when: less diff --git a/vars/defaults.yml b/vars/defaults.yml index 94845c3..1d92c7e 100644 --- a/vars/defaults.yml +++ b/vars/defaults.yml @@ -29,6 +29,8 @@ remote_debugger_key: "''" selenium: false selenium_url: https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar +less: true + # Set mysql_engine: mysql | mariadb mysql_engine: mysql # Set to "*" to listen on all interfaces diff --git a/vars/user.yml.sample b/vars/user.yml.sample index 549cca1..e49a63c 100644 --- a/vars/user.yml.sample +++ b/vars/user.yml.sample @@ -29,6 +29,8 @@ # selenium: false # selenium_url: https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar +# less: true + # Set mysql_engine: mysql | mariadb # mysql_engine: mysql # Set to "*" to listen on all interfaces