mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Install nodejs correctly
This commit is contained in:
parent
8f4bc1807d
commit
a95a4c5f99
1 changed files with 25 additions and 21 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
- name: Untar it to target location
|
- name: Untar it to target location
|
||||||
command: tar xzf {{ downloads_dir }}/{{ sugarizer_version }}.tar.gz -C {{ sugarizer_location }}
|
command: tar xzf {{ downloads_dir }}/{{ sugarizer_version }}.tar.gz -C {{ sugarizer_location }}
|
||||||
|
creates="{{ sugarizer_location }}/{{ sugarizer_version }}/index.html"
|
||||||
|
|
||||||
- name: Create a symbolic link from generic url to version specific location
|
- name: Create a symbolic link from generic url to version specific location
|
||||||
file: dest={{ sugarizer_location }}/sugarizer
|
file: dest={{ sugarizer_location }}/sugarizer
|
||||||
|
@ -11,15 +12,19 @@
|
||||||
state=link
|
state=link
|
||||||
|
|
||||||
- name: Install sugarizer required packages
|
- name: Install sugarizer required packages
|
||||||
package: name=nodejs
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
# - npm
|
with_items:
|
||||||
when: internet_available
|
- node-gyp
|
||||||
|
when: internet_available and is_debuntu
|
||||||
|
|
||||||
- name: Install npm non debian
|
- name: Install npm non debian
|
||||||
package: name=npm
|
package: name={{ item }}
|
||||||
state=present
|
state=present
|
||||||
when: internet_available and not is_debian
|
with_items:
|
||||||
|
- nodejs
|
||||||
|
- npm
|
||||||
|
when: internet_available and not is_debuntu
|
||||||
|
|
||||||
# attempting to reinstall npn is broken on raspbian 9
|
# attempting to reinstall npn is broken on raspbian 9
|
||||||
- name: check for npm already installed
|
- name: check for npm already installed
|
||||||
|
@ -36,7 +41,7 @@
|
||||||
when: internet_available and is_debian and not npm_exists
|
when: internet_available and is_debian and not npm_exists
|
||||||
|
|
||||||
- name: Actually get it installed
|
- name: Actually get it installed
|
||||||
command: apt-get install -y npm
|
command: apt-get install -y nodejs
|
||||||
when: internet_available and is_debian and not npm_exists
|
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
|
||||||
|
@ -68,22 +73,21 @@
|
||||||
chdir: "{{ sugarizer_location }}/sugarizer/server"
|
chdir: "{{ sugarizer_location }}/sugarizer/server"
|
||||||
when: is_F18
|
when: is_F18
|
||||||
|
|
||||||
#- name: enable services
|
- name: enable services
|
||||||
# service: name={{ item.name }}
|
service: name={{ item.name }}
|
||||||
# enabled=yes
|
enabled=yes
|
||||||
# state=restarted
|
state=restarted
|
||||||
# with_items:
|
with_items:
|
||||||
# - { name: sugarizer }
|
- { name: sugarizer }
|
||||||
# when: sugarizer_enabled
|
when: sugarizer_enabled
|
||||||
|
|
||||||
|
- name: disable services
|
||||||
#- name: disable services
|
service: name={{ item.name }}
|
||||||
# service: name={{ item.name }}
|
enabled=no
|
||||||
# enabled=no
|
state=stopped
|
||||||
# state=stopped
|
with_items:
|
||||||
# with_items:
|
- { name: sugarizer }
|
||||||
# - { name: sugarizer }
|
when: not sugarizer_enabled
|
||||||
# when: not sugarizer_enabled
|
|
||||||
|
|
||||||
- name: add sugarizer to service list
|
- name: add sugarizer to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue