1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

stat the npm files

This commit is contained in:
George Hunt 2017-09-04 11:43:00 -07:00
parent ed2b82a54c
commit 1f3dfd19d4
2 changed files with 13 additions and 2 deletions

View file

@ -2,3 +2,4 @@ sugarizer_install: True
sugarizer_enabled: False
sugarizer_location: '{{ doc_root }}'
sugarizer_version: 'sugarizer-0.8'
npm_exists: False

View file

@ -21,13 +21,23 @@
state=present
when: internet_available and not is_debian
# attempting to reinstall npn is broken on raspbian 9
- name: check for npm already installed
stat: path={{ sugarizer_location }}/sugarizer/server/node_modules
register: npm
- name: set a flag to abort second attempt to install
set_fact:
npm_exists: True
when npm.stat.exists is defined and npm.stat.exists
- name: Install npm on debian -- set up apt sources
shell: curl -sL https://deb.nodesource.com/setup_6.x | bash -
when: internet_available and is_debian
when: internet_available and is_debian and not npm_exists
- name: Actually get it installed
command: apt install -y npm
when: internet_available and is_debian
when: internet_available and is_debian and not npm_exists
- name: Create systemd files and copy our ini file
template: src={{ item.src }}