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
|
||||
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
|
||||
file: dest={{ sugarizer_location }}/sugarizer
|
||||
|
@ -11,15 +12,19 @@
|
|||
state=link
|
||||
|
||||
- name: Install sugarizer required packages
|
||||
package: name=nodejs
|
||||
package: name={{ item }}
|
||||
state=present
|
||||
# - npm
|
||||
when: internet_available
|
||||
with_items:
|
||||
- node-gyp
|
||||
when: internet_available and is_debuntu
|
||||
|
||||
- name: Install npm non debian
|
||||
package: name=npm
|
||||
package: name={{ item }}
|
||||
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
|
||||
- name: check for npm already installed
|
||||
|
@ -36,7 +41,7 @@
|
|||
when: internet_available and is_debian and not npm_exists
|
||||
|
||||
- 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
|
||||
|
||||
- name: Create systemd files and copy our ini file
|
||||
|
@ -68,22 +73,21 @@
|
|||
chdir: "{{ sugarizer_location }}/sugarizer/server"
|
||||
when: is_F18
|
||||
|
||||
#- name: enable services
|
||||
# service: name={{ item.name }}
|
||||
# enabled=yes
|
||||
# state=restarted
|
||||
# with_items:
|
||||
# - { name: sugarizer }
|
||||
# when: sugarizer_enabled
|
||||
- name: enable services
|
||||
service: name={{ item.name }}
|
||||
enabled=yes
|
||||
state=restarted
|
||||
with_items:
|
||||
- { name: sugarizer }
|
||||
when: sugarizer_enabled
|
||||
|
||||
|
||||
#- name: disable services
|
||||
# service: name={{ item.name }}
|
||||
# enabled=no
|
||||
# state=stopped
|
||||
# with_items:
|
||||
# - { name: sugarizer }
|
||||
# when: not sugarizer_enabled
|
||||
- name: disable services
|
||||
service: name={{ item.name }}
|
||||
enabled=no
|
||||
state=stopped
|
||||
with_items:
|
||||
- { name: sugarizer }
|
||||
when: not sugarizer_enabled
|
||||
|
||||
- name: add sugarizer to service list
|
||||
ini_file: dest='{{ service_filelist }}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue