aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/base_configuration/manifests/init.pp52
-rw-r--r--modules/base_packages/manifests/init.pp20
m---------modules/concat0
m---------modules/inifile0
m---------modules/ssh0
m---------modules/sudo0
m---------modules/systemd0
7 files changed, 54 insertions, 18 deletions
diff --git a/modules/base_configuration/manifests/init.pp b/modules/base_configuration/manifests/init.pp
new file mode 100644
index 0000000..4c6ca1e
--- /dev/null
+++ b/modules/base_configuration/manifests/init.pp
@@ -0,0 +1,52 @@
1class base_configuration (
2 $hostname = undef,
3 $username = "immae",
4 $userid = 1000
5) {
6 unless empty($hostname) {
7 class { 'systemd::hostname':
8 hostname => $hostname
9 }
10 }
11
12 user { "${username}:${userid}":
13 name => $username,
14 uid => $userid,
15 ensure => "present",
16 groups => "wheel",
17 managehome => true,
18 notify => Exec["remove_password"]
19 }
20
21 exec { "remove_password":
22 command => "/usr/bin/chage -d 0 $username && /usr/bin/passwd -d $username",
23 refreshonly => true
24 }
25
26 ssh_authorized_key { $username:
27 name => "immae@immae.eu",
28 user => $username,
29 type => "ssh-rsa",
30 key => "AAAAB3NzaC1yc2EAAAADAQABAAABAQDi5PgLBwMRyRwzJPnSgUyRAuB9AAxMijsw1pR/t/wmxQne1O5fIPOleHx+D8dyZbwm+XkzlcJpgT0Qy3qC9J8BPhshJvO/tA/8CI/oS/FE0uWsyACH1DMO2dk4gRRZGSE9IuzDMRPlnfZ3n0tdsPzzv3GH4It/oPIgsvkTowKztGLQ7Xmjr5BxzAhXcIQymqA0U3XWHSdWvnSRDaOFG0PDoVMS85IdwlviVKLnV5Sstb4NC/P28LFfgvW8DO/XrOqujgDomqTmR41dK/AyrGGOb2cQUMO4l8Oa+74aOyKaB61rr/rJkr+wCbEttkTvgFa6zZygSk3edfiWE2rgn4+v"
31 }
32
33 class { 'sudo':
34 config_file_replace => false
35 }
36
37 sudo::conf { 'wheel':
38 priority => 10,
39 content => "%wheel ALL=(ALL) ALL"
40 }
41
42 class { 'ssh::server':
43 storeconfigs_enabled => false,
44 options => {
45 'AcceptEnv' => undef,
46 'X11Forwarding' => 'yes',
47 'PrintMotd' => 'no',
48 'ChallengeResponseAuthentication' => 'no',
49 'Subsystem' => 'sftp /usr/lib/openssh/sftp-server',
50 }
51 }
52}
diff --git a/modules/base_packages/manifests/init.pp b/modules/base_packages/manifests/init.pp
index a935d1b..269ca58 100644
--- a/modules/base_packages/manifests/init.pp
+++ b/modules/base_packages/manifests/init.pp
@@ -1,24 +1,8 @@
1class base_packages { 1class base_packages {
2 # Preinstalled 2 # Preinstalled
3 package { 'base': 3 ensure_packages(['base', 'openssh', 'grub', 'sudo'])
4 ensure => 'latest',
5 }
6 package { 'openssh':
7 ensure => 'latest',
8 }
9 package { 'grub':
10 ensure => 'latest',
11 }
12 package { 'sudo':
13 ensure => 'latest',
14 }
15 4
16 # Puppet dependencies 5 # Puppet dependencies
17 package { 'git': 6 ensure_packages(['git', 'puppet'])
18 ensure => 'latest',
19 }
20 package { 'puppet':
21 ensure => 'latest',
22 }
23} 7}
24 8
diff --git a/modules/concat b/modules/concat
new file mode 160000
Subproject bdf92329db427b7e202cf762091985ea6b64b3c
diff --git a/modules/inifile b/modules/inifile
new file mode 160000
Subproject 3099468f61d0f0c7465c61279376a7e68cef035
diff --git a/modules/ssh b/modules/ssh
new file mode 160000
Subproject d0c77c06b7d9e03c9c30f564605e07535ee8f5c
diff --git a/modules/sudo b/modules/sudo
new file mode 160000
Subproject 6dad85360bf119368a2fe396da2e22c81e01f4d
diff --git a/modules/systemd b/modules/systemd
new file mode 160000
Subproject b0a93b8c4fa18f1f2c477c5348e9bccd3bdebd6