From a07a349baec6ed1f837d116250d0c9af829b7eb1 Mon Sep 17 00:00:00 2001 From: Gabriel M Schuyler Date: Thu, 10 Dec 2015 13:16:20 -0800 Subject: [PATCH] Add os-specific sub-classes and have profile::base use case $::kernel --- site/profile/manifests/base.pp | 11 ++++++++++- site/profile/manifests/base/linux.pp | 6 ++++++ site/profile/manifests/base/windows.pp | 6 ++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 site/profile/manifests/base/linux.pp create mode 100644 site/profile/manifests/base/windows.pp diff --git a/site/profile/manifests/base.pp b/site/profile/manifests/base.pp index ae85e65..709b71d 100644 --- a/site/profile/manifests/base.pp +++ b/site/profile/manifests/base.pp @@ -1,5 +1,14 @@ +# Base profiles include all the classes that should be included on all nodes. +# For cross-platform compatibility, this is broken up into platform-appropriate +# subclasses. This class applies the appropriate base profile based on the +# $::kernel fact. + class profile::base { - #the base profile should include component modules that will be on all nodes + # Include a platform-appropriate base profile + case $::kernel { + 'Linux': { include profile::base::linux } + 'windows': { include profile::base::windows } + } } diff --git a/site/profile/manifests/base/linux.pp b/site/profile/manifests/base/linux.pp new file mode 100644 index 0000000..889c07b --- /dev/null +++ b/site/profile/manifests/base/linux.pp @@ -0,0 +1,6 @@ +# A 'base' profile should include component modules that will be on all nodes +# of a particular operating system. + +class profile::base::linux { + +} diff --git a/site/profile/manifests/base/windows.pp b/site/profile/manifests/base/windows.pp new file mode 100644 index 0000000..51ee03f --- /dev/null +++ b/site/profile/manifests/base/windows.pp @@ -0,0 +1,6 @@ +# A 'base' profile should include component modules that will be on all nodes +# of a particular operating system. + +class profile::base::windows { + +}