Commit a692ae54f17eb641c17a050475e1ada2c24df6a8
1 parent
9640afa7
Exists in
master
and in
39 other branches
Giving colab sudo rights and adding supervisor task
Showing
2 changed files
with
25 additions
and
0 deletions
Show diff stats
puppet/modules/colab/manifests/init.pp
@@ -11,14 +11,35 @@ class colab { | @@ -11,14 +11,35 @@ class colab { | ||
11 | include supervisor | 11 | include supervisor |
12 | include colab::requirements | 12 | include colab::requirements |
13 | 13 | ||
14 | + group { 'colab': | ||
15 | + ensure => present, | ||
16 | + } | ||
17 | + | ||
14 | user { 'colab': | 18 | user { 'colab': |
15 | ensure => present, | 19 | ensure => present, |
16 | managehome => true, | 20 | managehome => true, |
17 | shell => '/bin/bash', | 21 | shell => '/bin/bash', |
22 | + gid => 'colab', | ||
23 | + groups => ['sudo'], | ||
18 | } | 24 | } |
19 | 25 | ||
20 | mailalias { 'colab': | 26 | mailalias { 'colab': |
21 | ensure => present, | 27 | ensure => present, |
22 | recipient => 'root', | 28 | recipient => 'root', |
23 | } | 29 | } |
30 | + | ||
31 | + file { 'colab-sudoers': | ||
32 | + ensure => present, | ||
33 | + path => '/etc/sudoers.d/colab-sudoers', | ||
34 | + source => 'puppet:///modules/colab/colab-sudoers', | ||
35 | + mode => '0440', | ||
36 | + owner => root, | ||
37 | + group => root, | ||
38 | + } | ||
39 | + | ||
40 | + supervisor::app { 'colab': | ||
41 | + command => '/home/colab/.virtualenvs/colab/bin/gunicorn_django colab/src/colab', | ||
42 | + directory => '/home/colab/', | ||
43 | + user => 'colab', | ||
44 | + } | ||
24 | } | 45 | } |