From f25ad097f24e0d39d5dd9ac2cef39760e671e08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 19 Mar 2018 17:13:37 +0100 Subject: =?UTF-8?q?Don=E2=80=99t=20mount=20unavailables=20mounts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/base_installation/manifests/fstab.pp | 18 ------------------ modules/base_installation/manifests/init.pp | 2 -- modules/base_installation/manifests/params.pp | 1 - modules/profile/manifests/fstab.pp | 18 ++++++++++++++++++ modules/role/manifests/backup.pp | 1 + 5 files changed, 19 insertions(+), 21 deletions(-) delete mode 100644 modules/base_installation/manifests/fstab.pp create mode 100644 modules/profile/manifests/fstab.pp (limited to 'modules') diff --git a/modules/base_installation/manifests/fstab.pp b/modules/base_installation/manifests/fstab.pp deleted file mode 100644 index f012e76..0000000 --- a/modules/base_installation/manifests/fstab.pp +++ /dev/null @@ -1,18 +0,0 @@ -class base_installation::fstab ( - $mounts = $base_installation::mounts -) inherits base_installation { - $mounts.each |$mount| { - unless empty($mount) { - $infos = split($mount, ';') - - file { $infos[0]: - ensure => directory, - } -> - mount { $infos[0]: - ensure => mounted, - device => "UUID=${infos[1]}", - fstype => $infos[2] - } - } - } -} diff --git a/modules/base_installation/manifests/init.pp b/modules/base_installation/manifests/init.pp index cb1cdda..998f8ff 100644 --- a/modules/base_installation/manifests/init.pp +++ b/modules/base_installation/manifests/init.pp @@ -6,7 +6,6 @@ class base_installation ( Optional[String] $ldap_dn = $base_installation::params::ldap_dn, Optional[String] $ldap_server = $base_installation::params::ldap_server, Optional[String] $ldap_uri = $base_installation::params::ldap_uri, - Optional[Array[String]] $mounts = $base_installation::params::mounts, Optional[String] $puppet_code_path = $base_installation::params::puppet_code_path, Optional[String] $puppet_conf_path = $base_installation::params::puppet_conf_path, Optional[String] $puppet_pass_seed = $base_installation::params::puppet_pass_seed, @@ -31,5 +30,4 @@ class base_installation ( contain ::base_installation::users contain ::base_installation::package_managers contain ::base_installation::puppet - contain ::base_installation::fstab } diff --git a/modules/base_installation/manifests/params.pp b/modules/base_installation/manifests/params.pp index 2a9fe6a..5ade838 100644 --- a/modules/base_installation/manifests/params.pp +++ b/modules/base_installation/manifests/params.pp @@ -10,7 +10,6 @@ class base_installation::params { $ldap_cert_path = "/etc/ssl/certs/ca-certificates.crt" $ldap_uri = "ldaps://ldap.example.com" $ldap_server = "ldap.example.com" - $mounts = [] $real_hostname = "example.com" $system_hostname = "example.com" $system_locales = ["en_US.UTF-8"] diff --git a/modules/profile/manifests/fstab.pp b/modules/profile/manifests/fstab.pp new file mode 100644 index 0000000..5f2e58e --- /dev/null +++ b/modules/profile/manifests/fstab.pp @@ -0,0 +1,18 @@ +class profile::fstab ( + Optional[Array] $mounts = [] +) { + $mounts.each |$mount| { + unless empty($mount) { + $infos = split($mount, ';') + + file { $infos[0]: + ensure => directory, + } -> + mount { $infos[0]: + ensure => mounted, + device => "UUID=${infos[1]}", + fstype => $infos[2] + } + } + } +} diff --git a/modules/role/manifests/backup.pp b/modules/role/manifests/backup.pp index edfd5e0..d7ba486 100644 --- a/modules/role/manifests/backup.pp +++ b/modules/role/manifests/backup.pp @@ -8,6 +8,7 @@ class role::backup ( ) { include "base_installation" + include "profile::fstab" include "profile::mail" include "profile::tools" include "profile::xmr_stak" -- cgit v1.2.3