summaryrefslogtreecommitdiff
path: root/provisioning/modules/phantomjs/manifests/init.pp
blob: 78ba734cb73de3a7cb13d9787c00d029ae9bc0c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class phantomjs {
  exec{'download_phantomjs':
    command => '/usr/bin/wget -O /var/local/phantomjs-1.9.8.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2',
    creates => '/var/local/phantomjs-1.9.8.tar.bz2',
    notify  => Exec['unpack_phantomjs'],
  }
  exec{'unpack_phantomjs':
    command     => '/bin/tar xvfj phantomjs-1.9.8.tar.bz2',
    cwd         => '/var/local/',
    refreshonly => true,
    notify      => Exec['install_phantomjs'],
  }
  exec{'install_phantomjs':
    command     => '/usr/bin/install /var/local/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/bin/phantomjs',
    refreshonly => true,
  }
}