Skip to content

Commit

Permalink
Issue #4 | Added phantomjs
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbung committed Dec 28, 2016
1 parent 37d32d8 commit 5ae4e90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions roles/nicolai86.phantomjs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

- get_url:
url: "{{ phantomjs_url }}"
dest: "/tmp/phantomjs.tar.bz2"
dest: "/tmp/phantomjs.tar.gz"
force: true
when: "not phantomjs.installed or phantomjs.version != '{{ phantomjs_version }}'"

# extract and copy in one step --strip-components=2 takes care that we don't copy the entire path just the bin file
- shell: "cd /tmp && tar xvjf /tmp/phantomjs.tar.bz2 -C /usr/local/bin/ --overwrite --wildcards '**/bin/phantomjs' --strip-components=2"
- shell: "cd /tmp && tar -xzf /tmp/phantomjs.tar.gz -C /usr/local/bin/ --overwrite --wildcards '**/bin/phantomjs' --strip-components=2"
sudo: true
when: "not phantomjs.installed or phantomjs.version != '{{ phantomjs_version }}'"

Expand Down
2 changes: 1 addition & 1 deletion vars/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ android_sdks_to_install:

# Phantom JS
phantomjs_version: "2.1.1"
phantomjs_url: "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-{{phantomjs_version}}-linux-x86_64.tar.bz2"
phantomjs_url: "https://github.com/ariya/phantomjs/archive/{{phantomjs_version}}.tar.gz"

0 comments on commit 5ae4e90

Please sign in to comment.