aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/inception.pp
blob: 7cd9d0a0cf398fcfa59980beabf8712f6cba820a (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
define nodo::subsystem::inception(
  $bundle  = 'console',
  $git_dev = $name,
) {
  vcsrepo { "/home/${name}/apps":
    ensure     => present,
    owner      => $name,
    group      => $name,
    user       => $name,
    provider   => git,
    source     => "https://git.fluxo.info/${git_dev}/apps",
    revision   => 'e59e4465dd90943853aba944056e0790c8c746e1',
    submodules => true,
    require    => [ File["/home/${name}"], User[$name] ],
  }

  exec { "inception-install-${name}":
    user        => $name,
    environment => [ "HOME=/home/${name}" ],
    cwd         => "/home/${name}",
    creates     => "/home/${name}/.dotfiles",
    command     => "/home/${name}/apps/infection install ${bundle}",
    require     => Vcsrepo["/home/${name}/apps"],
  }
}