summaryrefslogtreecommitdiff
path: root/provisioning/modules/pixelated/manifests/source/install_useragent.pp
blob: d79d414440e58d8abe333e1cb199bf4a7d7fcc25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# install useragent in a virtualenv
# and make sure venv is activated on login
class pixelated::source::install_useragent {

  $virtualenv_path = '/home/vagrant/.venvs/pixua'

  exec { 'install-pixelated':
    # use of "user" parameter doesn't set env variables right,
    # see https://projects.puppetlabs.com/issues/23053
    # therefore we need to explicitily set them here
    environment => [ 'USERNAME=vagrant', 'HOME=/home/vagrant' ],
    command     => '/usr/bin/make install',
    cwd         => '/vagrant',
    user        => 'vagrant',
    # to debug use this
    logoutput   => true,
    timeout     => 0
  }

  file { '/home/vagrant/.bashrc':
    owner  => 'vagrant',
    mode   => '0644',
    source => 'puppet:///modules/pixelated/.bashrc',
  }

}