]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Move data to hiera
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 29 Aug 2017 19:50:05 +0000 (21:50 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 29 Aug 2017 20:46:14 +0000 (22:46 +0200)
environments/production/data/common.yaml [new file with mode: 0644]
environments/production/data/types/vps-ovhssd-1.yaml [new file with mode: 0644]
environments/production/hiera.yaml [new file with mode: 0644]
modules/base_installation/manifests/params.pp

diff --git a/environments/production/data/common.yaml b/environments/production/data/common.yaml
new file mode 100644 (file)
index 0000000..e129d47
--- /dev/null
@@ -0,0 +1,12 @@
+---
+base_installation::puppet_code_path: "/etc/puppetlabs/code"
+base_installation::system_locales: ["fr_FR.UTF-8", "en_US.UTF-8"]
+base_installation::system_timezone: "Europe/Paris"
+base_installation::system_users:
+  - userid: 1000
+    username: "immae"
+    groups: ["wheel"]
+    keys:
+      - host: "immae.eu"
+        key: "AAAAB3NzaC1yc2EAAAADAQABAAABAQDi5PgLBwMRyRwzJPnSgUyRAuB9AAxMijsw1pR/t/wmxQne1O5fIPOleHx+D8dyZbwm+XkzlcJpgT0Qy3qC9J8BPhshJvO/tA/8CI/oS/FE0uWsyACH1DMO2dk4gRRZGSE9IuzDMRPlnfZ3n0tdsPzzv3GH4It/oPIgsvkTowKztGLQ7Xmjr5BxzAhXcIQymqA0U3XWHSdWvnSRDaOFG0PDoVMS85IdwlviVKLnV5Sstb4NC/P28LFfgvW8DO/XrOqujgDomqTmR41dK/AyrGGOb2cQUMO4l8Oa+74aOyKaB61rr/rJkr+wCbEttkTvgFa6zZygSk3edfiWE2rgn4+v"
+        key_type: "ssh-rsa"
diff --git a/environments/production/data/types/vps-ovhssd-1.yaml b/environments/production/data/types/vps-ovhssd-1.yaml
new file mode 100644 (file)
index 0000000..72f3820
--- /dev/null
@@ -0,0 +1,3 @@
+---
+base_installation::system_hostname: "new.immae.eu"
+base_installation::grub_device: "/dev/sdb"
diff --git a/environments/production/hiera.yaml b/environments/production/hiera.yaml
new file mode 100644 (file)
index 0000000..095a110
--- /dev/null
@@ -0,0 +1,19 @@
+---
+version: 5
+
+defaults:
+  datadir: data
+  data_hash: yaml_data
+
+hierarchy:
+  - name: "Per-node data"
+    path: "nodes/%{facts.ec2_metadata.hostname}.yaml"
+
+  - name: "Per-role data"
+    mapped_paths: [roles, role, "roles/%{role}.yaml"]
+
+  - name: "Per-type data"
+    path: "types/%{facts.ec2_metadata.instance-type}.yaml"
+
+  - name: "Common data"
+    path: "common.yaml"
index 5f2e298db78576dad840c658fd902ae8ee893449..f09f01a60ba3cb3075746d423bcf6ec02763b7c4 100644 (file)
@@ -1,18 +1,18 @@
 class base_installation::params {
   $puppet_code_path = "/etc/puppetlabs/code"
   $grub_device      = "/dev/sda"
-  $system_hostname  = "new.immae.eu"
-  $system_locales   = ["fr_FR.UTF-8", "en_US.UTF-8"]
-  $system_timezone  = "Europe/Paris"
+  $system_hostname  = "example.com"
+  $system_locales   = ["en_US.UTF-8"]
+  $system_timezone  = "UTC"
   $system_users     = [
     {
       userid   => 1000,
-      username => "immae",
-      groups   => ["wheel"],
+      username => "example",
+      groups   => ["sudo"],
       keys     => [
         {
-          host     => "immae.eu",
-          key      => "AAAAB3NzaC1yc2EAAAADAQABAAABAQDi5PgLBwMRyRwzJPnSgUyRAuB9AAxMijsw1pR/t/wmxQne1O5fIPOleHx+D8dyZbwm+XkzlcJpgT0Qy3qC9J8BPhshJvO/tA/8CI/oS/FE0uWsyACH1DMO2dk4gRRZGSE9IuzDMRPlnfZ3n0tdsPzzv3GH4It/oPIgsvkTowKztGLQ7Xmjr5BxzAhXcIQymqA0U3XWHSdWvnSRDaOFG0PDoVMS85IdwlviVKLnV5Sstb4NC/P28LFfgvW8DO/XrOqujgDomqTmR41dK/AyrGGOb2cQUMO4l8Oa+74aOyKaB61rr/rJkr+wCbEttkTvgFa6zZygSk3edfiWE2rgn4+v",
+          host     => "local.example.com",
+          key      => "AAAAB3",
           key_type => "ssh-rsa"
         }
       ]