diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-29 21:50:05 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-29 22:46:14 +0200 |
commit | 0b62a18bd9fc4ecd614526a9c0e3f1f17e2ce4fe (patch) | |
tree | d47bd23691ddb751534a02d47befbe401ed14382 | |
parent | 7fed35a408b9ec37454169425823785b5fc8978b (diff) | |
download | Puppet-0b62a18bd9fc4ecd614526a9c0e3f1f17e2ce4fe.tar.gz Puppet-0b62a18bd9fc4ecd614526a9c0e3f1f17e2ce4fe.tar.zst Puppet-0b62a18bd9fc4ecd614526a9c0e3f1f17e2ce4fe.zip |
Move data to hiera
-rw-r--r-- | environments/production/data/common.yaml | 12 | ||||
-rw-r--r-- | environments/production/data/types/vps-ovhssd-1.yaml | 3 | ||||
-rw-r--r-- | environments/production/hiera.yaml | 19 | ||||
-rw-r--r-- | modules/base_installation/manifests/params.pp | 14 |
4 files changed, 41 insertions, 7 deletions
diff --git a/environments/production/data/common.yaml b/environments/production/data/common.yaml new file mode 100644 index 0000000..e129d47 --- /dev/null +++ b/environments/production/data/common.yaml | |||
@@ -0,0 +1,12 @@ | |||
1 | --- | ||
2 | base_installation::puppet_code_path: "/etc/puppetlabs/code" | ||
3 | base_installation::system_locales: ["fr_FR.UTF-8", "en_US.UTF-8"] | ||
4 | base_installation::system_timezone: "Europe/Paris" | ||
5 | base_installation::system_users: | ||
6 | - userid: 1000 | ||
7 | username: "immae" | ||
8 | groups: ["wheel"] | ||
9 | keys: | ||
10 | - host: "immae.eu" | ||
11 | key: "AAAAB3NzaC1yc2EAAAADAQABAAABAQDi5PgLBwMRyRwzJPnSgUyRAuB9AAxMijsw1pR/t/wmxQne1O5fIPOleHx+D8dyZbwm+XkzlcJpgT0Qy3qC9J8BPhshJvO/tA/8CI/oS/FE0uWsyACH1DMO2dk4gRRZGSE9IuzDMRPlnfZ3n0tdsPzzv3GH4It/oPIgsvkTowKztGLQ7Xmjr5BxzAhXcIQymqA0U3XWHSdWvnSRDaOFG0PDoVMS85IdwlviVKLnV5Sstb4NC/P28LFfgvW8DO/XrOqujgDomqTmR41dK/AyrGGOb2cQUMO4l8Oa+74aOyKaB61rr/rJkr+wCbEttkTvgFa6zZygSk3edfiWE2rgn4+v" | ||
12 | 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 index 0000000..72f3820 --- /dev/null +++ b/environments/production/data/types/vps-ovhssd-1.yaml | |||
@@ -0,0 +1,3 @@ | |||
1 | --- | ||
2 | base_installation::system_hostname: "new.immae.eu" | ||
3 | base_installation::grub_device: "/dev/sdb" | ||
diff --git a/environments/production/hiera.yaml b/environments/production/hiera.yaml new file mode 100644 index 0000000..095a110 --- /dev/null +++ b/environments/production/hiera.yaml | |||
@@ -0,0 +1,19 @@ | |||
1 | --- | ||
2 | version: 5 | ||
3 | |||
4 | defaults: | ||
5 | datadir: data | ||
6 | data_hash: yaml_data | ||
7 | |||
8 | hierarchy: | ||
9 | - name: "Per-node data" | ||
10 | path: "nodes/%{facts.ec2_metadata.hostname}.yaml" | ||
11 | |||
12 | - name: "Per-role data" | ||
13 | mapped_paths: [roles, role, "roles/%{role}.yaml"] | ||
14 | |||
15 | - name: "Per-type data" | ||
16 | path: "types/%{facts.ec2_metadata.instance-type}.yaml" | ||
17 | |||
18 | - name: "Common data" | ||
19 | path: "common.yaml" | ||
diff --git a/modules/base_installation/manifests/params.pp b/modules/base_installation/manifests/params.pp index 5f2e298..f09f01a 100644 --- a/modules/base_installation/manifests/params.pp +++ b/modules/base_installation/manifests/params.pp | |||
@@ -1,18 +1,18 @@ | |||
1 | class base_installation::params { | 1 | class base_installation::params { |
2 | $puppet_code_path = "/etc/puppetlabs/code" | 2 | $puppet_code_path = "/etc/puppetlabs/code" |
3 | $grub_device = "/dev/sda" | 3 | $grub_device = "/dev/sda" |
4 | $system_hostname = "new.immae.eu" | 4 | $system_hostname = "example.com" |
5 | $system_locales = ["fr_FR.UTF-8", "en_US.UTF-8"] | 5 | $system_locales = ["en_US.UTF-8"] |
6 | $system_timezone = "Europe/Paris" | 6 | $system_timezone = "UTC" |
7 | $system_users = [ | 7 | $system_users = [ |
8 | { | 8 | { |
9 | userid => 1000, | 9 | userid => 1000, |
10 | username => "immae", | 10 | username => "example", |
11 | groups => ["wheel"], | 11 | groups => ["sudo"], |
12 | keys => [ | 12 | keys => [ |
13 | { | 13 | { |
14 | host => "immae.eu", | 14 | host => "local.example.com", |
15 | key => "AAAAB3NzaC1yc2EAAAADAQABAAABAQDi5PgLBwMRyRwzJPnSgUyRAuB9AAxMijsw1pR/t/wmxQne1O5fIPOleHx+D8dyZbwm+XkzlcJpgT0Qy3qC9J8BPhshJvO/tA/8CI/oS/FE0uWsyACH1DMO2dk4gRRZGSE9IuzDMRPlnfZ3n0tdsPzzv3GH4It/oPIgsvkTowKztGLQ7Xmjr5BxzAhXcIQymqA0U3XWHSdWvnSRDaOFG0PDoVMS85IdwlviVKLnV5Sstb4NC/P28LFfgvW8DO/XrOqujgDomqTmR41dK/AyrGGOb2cQUMO4l8Oa+74aOyKaB61rr/rJkr+wCbEttkTvgFa6zZygSk3edfiWE2rgn4+v", | 15 | key => "AAAAB3", |
16 | key_type => "ssh-rsa" | 16 | key_type => "ssh-rsa" |
17 | } | 17 | } |
18 | ] | 18 | ] |