From a869ea173f9a1e45f63336ad9d640bf94e5039e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 13 Mar 2018 10:20:17 +0100 Subject: Refactor hiera environments --- environments/global/common.yaml | 37 ++++++++++++++++++++++++++ environments/global/roles/cryptoportfolio.yaml | 4 +++ environments/global/types/s1-2.yaml | 9 +++++++ environments/global/types/vps-ovhssd-1.yaml | 10 +++++++ 4 files changed, 60 insertions(+) create mode 100644 environments/global/common.yaml create mode 100644 environments/global/roles/cryptoportfolio.yaml create mode 100644 environments/global/types/s1-2.yaml create mode 100644 environments/global/types/vps-ovhssd-1.yaml (limited to 'environments/global') diff --git a/environments/global/common.yaml b/environments/global/common.yaml new file mode 100644 index 0000000..5b21dca --- /dev/null +++ b/environments/global/common.yaml @@ -0,0 +1,37 @@ +--- +lookup_options: + base_installation::mounts: + merge: unique + classes: + merge: deep + base_installation::system_users: + merge: unique + +classes: + stdlib: ~ + +base_installation::ldap_base: "dc=immae,dc=eu" +base_installation::ldap_dn: "cn=%{facts.ec2_metadata.hostname},ou=hosts,dc=immae,dc=eu" +base_installation::ldap_cn: "%{facts.ec2_metadata.hostname}" +base_installation::ldap_server: "ldap.immae.eu" +base_installation::ldap_uri: "ldaps://ldap.immae.eu" +# FIXME: get all mounts without needing that hack? +base_installation::mounts: + - "%{facts.ldapvar.self.vars.mounts.0}" + - "%{facts.ldapvar.self.vars.mounts.1}" +base_installation::puppet_conf_path: "/etc/puppetlabs/puppet" +base_installation::puppet_code_path: "/etc/puppetlabs/code" +base_installation::puppet_pass_seed: "/etc/puppetlabs/puppet/password_seed" +base_installation::puppet_ssl_path: "/etc/puppetlabs/ssl" +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" +xmr_stak::mining_pool: "pool.minexmr.com:7777" +xmr_stak::wallet: "44CA8TxTFYbQqN2kLyk8AnB6Ghz4mcbGpYC2EyXW7A8H9QspvWnTjDn39XUZDPrFwPa5JNwt4TmAxcooPWv4SaJqL87Bcdo" diff --git a/environments/global/roles/cryptoportfolio.yaml b/environments/global/roles/cryptoportfolio.yaml new file mode 100644 index 0000000..3d36e71 --- /dev/null +++ b/environments/global/roles/cryptoportfolio.yaml @@ -0,0 +1,4 @@ +--- +classes: + role::cryptoportfolio: ~ +cryptoportfolio::slack_webhook: "%{ldapvar.self.vars.cf_slack_webhook.0}" diff --git a/environments/global/types/s1-2.yaml b/environments/global/types/s1-2.yaml new file mode 100644 index 0000000..496b741 --- /dev/null +++ b/environments/global/types/s1-2.yaml @@ -0,0 +1,9 @@ +--- +classes: + base_installation: + stage: "setup" + +base_installation::system_hostname: "%{ldapvar.self.vars.host.0}" +base_installation::real_hostname: "%{facts.ec2_metadata.hostname}.v.immae.eu" +base_installation::ldap_cert_path: "/etc/ssl/certs/ca-certificates.crt" +ssl::try_letsencrypt_for_real_hostname: true diff --git a/environments/global/types/vps-ovhssd-1.yaml b/environments/global/types/vps-ovhssd-1.yaml new file mode 100644 index 0000000..73f7a45 --- /dev/null +++ b/environments/global/types/vps-ovhssd-1.yaml @@ -0,0 +1,10 @@ +--- +classes: + base_installation: + stage: "setup" + +base_installation::system_hostname: "%{ldapvar.self.vars.host.0}" +base_installation::real_hostname: "%{facts.ec2_metadata.hostname}.ovh.net" +base_installation::grub_device: "/dev/sdb" +base_installation::ldap_cert_path: "/etc/ssl/certs/ca-certificates.crt" +ssl::try_letsencrypt_for_real_hostname: false -- cgit v1.2.3