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

Merge pull request #216 from georgejhunt/npmreinstall

Npmreinstall, with @jvonau fixed added; smoke-tested twice by @holta
This commit is contained in:
A Holt 2017-09-07 23:15:16 -04:00 committed by GitHub
commit f8c8c61bd5
2 changed files with 14 additions and 3 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
command: apt-get install -y npm
when: internet_available and is_debian and not npm_exists
- name: Create systemd files and copy our ini file
template: src={{ item.src }}