From 99350dbb343670593bf1aa2069e8b2f50f56b320 Mon Sep 17 00:00:00 2001 From: jeff levesque Date: Mon, 6 Mar 2017 19:03:51 -0500 Subject: [PATCH] #2932: remove unnecessary class nesting --- .../modules/compiler/manifests/init.pp | 45 ++++------------- .../modules/database/manifests/init.pp | 24 ++-------- .../vagrant/modules/package/manifests/init.pp | 48 +++++++------------ 3 files changed, 30 insertions(+), 87 deletions(-) diff --git a/puppet/environment/vagrant/modules/compiler/manifests/init.pp b/puppet/environment/vagrant/modules/compiler/manifests/init.pp index ebc0d14a0..966efb846 100644 --- a/puppet/environment/vagrant/modules/compiler/manifests/init.pp +++ b/puppet/environment/vagrant/modules/compiler/manifests/init.pp @@ -4,45 +4,18 @@ class compiler { ## ensure log directory, package dependencies - class dependencies { - require system::log_directory - contain package::webcompilers - } + require system::log_directory + contain package::webcompilers ## configure webcompilers - class configure { - ## set dependency - require dependencies + contain compiler::webcompilers - ## configure webcompilers - require system::webcompiler_directory - contain compiler::webcompilers - } - - ## start webcompilers - class start { - ## set dependency - require dependencies - require configure - - ## start compiler(s) - contain compiler::start_sass - contain compiler::start_uglifyjs - contain compiler::start_browserify - contain compiler::start_imagemin - } + ## start compiler(s) + contain compiler::start_sass + contain compiler::start_uglifyjs + contain compiler::start_browserify + contain compiler::start_imagemin ## initial compile - class initiate { - ## set dependency - require dependencies - require configure - require start - - ## initial compile - contain compiler::initial_compile - } - - ## initiate - include initiate + contain compiler::initial_compile } \ No newline at end of file diff --git a/puppet/environment/vagrant/modules/database/manifests/init.pp b/puppet/environment/vagrant/modules/database/manifests/init.pp index bf9b7fbd9..cc49fe607 100644 --- a/puppet/environment/vagrant/modules/database/manifests/init.pp +++ b/puppet/environment/vagrant/modules/database/manifests/init.pp @@ -3,24 +3,8 @@ ### class database { - ## install sql - class install_sql { - ## install mariadb - contain database::server - - ## install mariadb client - contain database::client - - ## install mariad bindings - contain database::bindings - } - - ## create database tables - class create_db { - require install_sql - contain database::database - } - - ## initiate - include create_db + contain database::server + contain database::client + contain database::bindings + contain database::database } \ No newline at end of file diff --git a/puppet/environment/vagrant/modules/package/manifests/init.pp b/puppet/environment/vagrant/modules/package/manifests/init.pp index ba91ed1b3..13ad7ce9e 100644 --- a/puppet/environment/vagrant/modules/package/manifests/init.pp +++ b/puppet/environment/vagrant/modules/package/manifests/init.pp @@ -6,39 +6,25 @@ ## nodejs, with npm: this cannot be wrapped into a module, and included, as ## needed. Puppet will only allow one instance of this class, ## regardless of its implementation. - class install_nodejs { - ## set dependency - require apt + require apt - ## install nodejs, with npm - class { 'nodejs': - repo_url_suffix => '5.x', - } - contain nodejs + ## install nodejs, with npm + class { 'nodejs': + repo_url_suffix => '5.x', } + contain nodejs ## general packages - class general_packages { - ## set dependency - require apt - require install_nodejs - require system::webcompiler_directory - - ## install packages - contain package::inotify_tools - contain package::react_presets - contain package::jsonschema - contain package::xmltodict - contain package::six - contain package::fetch - contain package::pyyaml - contain package::flask_script - contain package::pytest_flask - contain package::python_dev - contain package::libssl_dev - contain package::scrypt - } + contain package::inotify_tools + contain package::react_presets + contain package::jsonschema + contain package::xmltodict + contain package::six + contain package::fetch + contain package::pyyaml + contain package::flask_script + contain package::pytest_flask + contain package::python_dev + contain package::libssl_dev + contain package::scrypt } - -## initiate -include general_packages