Skip to content

Commit

Permalink
able to compile on macs now
Browse files Browse the repository at this point in the history
  • Loading branch information
otakup0pe committed Feb 14, 2018
1 parent 2da9c1f commit 83a31ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ galaxy_info:

dependencies:
- role: ANXS.build-essential
when: nodejs_install_method is defined and nodejs_install_method == "source"
when: >
nodejs_install_method is defined and
nodejs_install_method == "source" and
ansible_os_family == 'Debian'
8 changes: 7 additions & 1 deletion tasks/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
src: "/tmp/node-v{{nodejs_version}}.tar.gz"
dest: "/tmp"

- name: node.js | source |Get the number of processors
- name: node.js | source |Get the number of processors (Linux)
command: nproc
register: cpu_count
when: ansible_system == 'Linux'

- name: node.js | source |Get the number of processors (Darwin)
command: sysctl -n hw.ncpu
register: cpu_count
when: ansible_os_family == 'Darwin'

- name: node.js | source | Build node.js from source
shell: >
cd /tmp/node-v{{nodejs_version}} &&
Expand Down

0 comments on commit 83a31ab

Please sign in to comment.