From 851ca3c6f662e26e949e57669d7962abb6c22510 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 5 Jun 2018 21:14:55 +0200 Subject: [PATCH] Caldance --- environments/global/roles/caldance.yaml | 4 ++++ modules/base_installation/manifests/users.pp | 8 ++++++++ modules/role/manifests/caldance.pp | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 environments/global/roles/caldance.yaml create mode 100644 modules/role/manifests/caldance.pp 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 @@ +--- +classes: + role::caldance: ~ +letsencrypt::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 ( $users.each |$user| { if ($user["username"] != "root") { + unless $user["shell"] == undef or empty($user["shell"]) { + ensure_packages([$user["shell"]]) + $shell = "/bin/${user[shell]}" + } else { + $shell = undef + } + user { "${user[username]}:${user[userid]}": name => $user[username], uid => $user[userid], @@ -30,6 +37,7 @@ class base_installation::users ( managehome => true, system => !!$user[system], home => "/home/${user[username]}", + shell => $shell, notify => Exec["remove_password:${user[username]}:${user[userid]}"], purge_ssh_keys => true } 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 @@ +class role::caldance ( +) { + include "base_installation" + + include "profile::tools" + include "profile::postgresql" + include "profile::apache" + include "profile::redis" + + ensure_packages(["python-pip", "python-virtualenv", "python-django"]) +} -- 2.41.0