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:
commit
f8c8c61bd5
2 changed files with 14 additions and 3 deletions
|
@ -2,3 +2,4 @@ sugarizer_install: True
|
||||||
sugarizer_enabled: False
|
sugarizer_enabled: False
|
||||||
sugarizer_location: '{{ doc_root }}'
|
sugarizer_location: '{{ doc_root }}'
|
||||||
sugarizer_version: 'sugarizer-0.8'
|
sugarizer_version: 'sugarizer-0.8'
|
||||||
|
npm_exists: False
|
||||||
|
|
|
@ -21,13 +21,23 @@
|
||||||
state=present
|
state=present
|
||||||
when: internet_available and not is_debian
|
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
|
- name: Install npm on debian -- set up apt sources
|
||||||
shell: curl -sL https://deb.nodesource.com/setup_6.x | bash -
|
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
|
- name: Actually get it installed
|
||||||
command: apt install -y npm
|
command: apt-get 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
|
- name: Create systemd files and copy our ini file
|
||||||
template: src={{ item.src }}
|
template: src={{ item.src }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue