aboutsummaryrefslogtreecommitdiff
path: root/manifests/composer.pp
blob: 4ab3337c09c02df613b1e1a41fac02e8a78f516f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class php::composer {
  # TODO: future
  package { 'composer':
    ensure  => absent,
  }

  # Composer
  exec { 'getcomposer':
    # 'The HOME or COMPOSER_HOME environment variable must be set for composer to install correctly'
    environment => [ 'HOME=/root' ],
    command     => '/usr/bin/wget -O - https://getcomposer.org/installer | /usr/bin/php && /bin/mv composer.phar /usr/local/bin/composer',
    user        => 'root',
    cwd         => '/tmp',
    creates     => '/usr/local/bin/composer',
  }
}