aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-06-05 21:14:55 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-06-05 22:47:47 +0200
commit851ca3c6f662e26e949e57669d7962abb6c22510 (patch)
tree6677e8dc17cecd9e56b9c25a3c2a322cb622c378
parent435b97f50bdc1c8a5e48bedf3772fcb16abb3440 (diff)
downloadPuppet-851ca3c6f662e26e949e57669d7962abb6c22510.tar.gz
Puppet-851ca3c6f662e26e949e57669d7962abb6c22510.tar.zst
Puppet-851ca3c6f662e26e949e57669d7962abb6c22510.zip
Caldance
-rw-r--r--environments/global/roles/caldance.yaml4
-rw-r--r--modules/base_installation/manifests/users.pp8
-rw-r--r--modules/role/manifests/caldance.pp11
3 files changed, 23 insertions, 0 deletions
diff --git a/environments/global/roles/caldance.yaml b/environments/global/roles/caldance.yaml
new file mode 100644
index 0000000..1dc7fa8
--- /dev/null
+++ b/environments/global/roles/caldance.yaml
@@ -0,0 +1,4 @@
1---
2classes:
3 role::caldance: ~
4letsencrypt::hosts: "%{lookup('base_installation::system_hostname')}"
diff --git a/modules/base_installation/manifests/users.pp b/modules/base_installation/manifests/users.pp
index 34df4bd..d0ac449 100644
--- a/modules/base_installation/manifests/users.pp
+++ b/modules/base_installation/manifests/users.pp
@@ -22,6 +22,13 @@ class base_installation::users (
22 22
23 $users.each |$user| { 23 $users.each |$user| {
24 if ($user["username"] != "root") { 24 if ($user["username"] != "root") {
25 unless $user["shell"] == undef or empty($user["shell"]) {
26 ensure_packages([$user["shell"]])
27 $shell = "/bin/${user[shell]}"
28 } else {
29 $shell = undef
30 }
31
25 user { "${user[username]}:${user[userid]}": 32 user { "${user[username]}:${user[userid]}":
26 name => $user[username], 33 name => $user[username],
27 uid => $user[userid], 34 uid => $user[userid],
@@ -30,6 +37,7 @@ class base_installation::users (
30 managehome => true, 37 managehome => true,
31 system => !!$user[system], 38 system => !!$user[system],
32 home => "/home/${user[username]}", 39 home => "/home/${user[username]}",
40 shell => $shell,
33 notify => Exec["remove_password:${user[username]}:${user[userid]}"], 41 notify => Exec["remove_password:${user[username]}:${user[userid]}"],
34 purge_ssh_keys => true 42 purge_ssh_keys => true
35 } 43 }
diff --git a/modules/role/manifests/caldance.pp b/modules/role/manifests/caldance.pp
new file mode 100644
index 0000000..75d9dbd
--- /dev/null
+++ b/modules/role/manifests/caldance.pp
@@ -0,0 +1,11 @@
1class role::caldance (
2) {
3 include "base_installation"
4
5 include "profile::tools"
6 include "profile::postgresql"
7 include "profile::apache"
8 include "profile::redis"
9
10 ensure_packages(["python-pip", "python-virtualenv", "python-django"])
11}