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:
parent
ed2b82a54c
commit
1f3dfd19d4
2 changed files with 13 additions and 2 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 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