From ead7f3c706657bbfae37ff40c8f919fb57c8a841 Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Thu, 31 Jan 2019 16:58:13 -0800 Subject: Rename site directory to site-modules Prior to this commit, we placed modules local to a users installation in the `site` directory. This was just a convention and the name `site` doesn't clearly convey what it is for. After this commit, we place modules local to a users installation in the `site-modules` directory. This makes it more clear to users that this is a directory that modules go i. When users start with bolt they won't even know what a control-repo is and renaming site to site-modules gives them a better idea of why they should put their modules with tasks in them. Also see: https://tickets.puppetlabs.com/browse/BOLT-1108 --- environment.conf | 2 +- site-modules/profile/manifests/base.pp | 5 +++++ site-modules/profile/manifests/example.pp | 3 +++ site-modules/role/manifests/database_server.pp | 7 +++++++ site-modules/role/manifests/example.pp | 3 +++ site-modules/role/manifests/webserver.pp | 7 +++++++ site/profile/manifests/base.pp | 5 ----- site/profile/manifests/example.pp | 3 --- site/role/manifests/database_server.pp | 7 ------- site/role/manifests/example.pp | 3 --- site/role/manifests/webserver.pp | 7 ------- 11 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 site-modules/profile/manifests/base.pp create mode 100644 site-modules/profile/manifests/example.pp create mode 100644 site-modules/role/manifests/database_server.pp create mode 100644 site-modules/role/manifests/example.pp create mode 100644 site-modules/role/manifests/webserver.pp delete mode 100644 site/profile/manifests/base.pp delete mode 100644 site/profile/manifests/example.pp delete mode 100644 site/role/manifests/database_server.pp delete mode 100644 site/role/manifests/example.pp delete mode 100644 site/role/manifests/webserver.pp diff --git a/environment.conf b/environment.conf index a986777..11e1003 100644 --- a/environment.conf +++ b/environment.conf @@ -1,2 +1,2 @@ -modulepath = site:modules:$basemodulepath +modulepath = site-modules:modules:$basemodulepath config_version = 'scripts/config_version.sh $environmentpath $environment' diff --git a/site-modules/profile/manifests/base.pp b/site-modules/profile/manifests/base.pp new file mode 100644 index 0000000..ae85e65 --- /dev/null +++ b/site-modules/profile/manifests/base.pp @@ -0,0 +1,5 @@ +class profile::base { + + #the base profile should include component modules that will be on all nodes + +} diff --git a/site-modules/profile/manifests/example.pp b/site-modules/profile/manifests/example.pp new file mode 100644 index 0000000..0b48c3a --- /dev/null +++ b/site-modules/profile/manifests/example.pp @@ -0,0 +1,3 @@ +class profile::example { + +} diff --git a/site-modules/role/manifests/database_server.pp b/site-modules/role/manifests/database_server.pp new file mode 100644 index 0000000..aacc912 --- /dev/null +++ b/site-modules/role/manifests/database_server.pp @@ -0,0 +1,7 @@ +class role::database_server { + + #This role would be made of all the profiles that need to be included to make a database server work + #All roles should include the base profile + include profile::base + +} diff --git a/site-modules/role/manifests/example.pp b/site-modules/role/manifests/example.pp new file mode 100644 index 0000000..2c1d2d7 --- /dev/null +++ b/site-modules/role/manifests/example.pp @@ -0,0 +1,3 @@ +class role::example { + +} diff --git a/site-modules/role/manifests/webserver.pp b/site-modules/role/manifests/webserver.pp new file mode 100644 index 0000000..314fa55 --- /dev/null +++ b/site-modules/role/manifests/webserver.pp @@ -0,0 +1,7 @@ +class role::webserver { + + #This role would be made of all the profiles that need to be included to make a webserver work + #All roles should include the base profile + include profile::base + +} diff --git a/site/profile/manifests/base.pp b/site/profile/manifests/base.pp deleted file mode 100644 index ae85e65..0000000 --- a/site/profile/manifests/base.pp +++ /dev/null @@ -1,5 +0,0 @@ -class profile::base { - - #the base profile should include component modules that will be on all nodes - -} diff --git a/site/profile/manifests/example.pp b/site/profile/manifests/example.pp deleted file mode 100644 index 0b48c3a..0000000 --- a/site/profile/manifests/example.pp +++ /dev/null @@ -1,3 +0,0 @@ -class profile::example { - -} diff --git a/site/role/manifests/database_server.pp b/site/role/manifests/database_server.pp deleted file mode 100644 index aacc912..0000000 --- a/site/role/manifests/database_server.pp +++ /dev/null @@ -1,7 +0,0 @@ -class role::database_server { - - #This role would be made of all the profiles that need to be included to make a database server work - #All roles should include the base profile - include profile::base - -} diff --git a/site/role/manifests/example.pp b/site/role/manifests/example.pp deleted file mode 100644 index 2c1d2d7..0000000 --- a/site/role/manifests/example.pp +++ /dev/null @@ -1,3 +0,0 @@ -class role::example { - -} diff --git a/site/role/manifests/webserver.pp b/site/role/manifests/webserver.pp deleted file mode 100644 index 314fa55..0000000 --- a/site/role/manifests/webserver.pp +++ /dev/null @@ -1,7 +0,0 @@ -class role::webserver { - - #This role would be made of all the profiles that need to be included to make a webserver work - #All roles should include the base profile - include profile::base - -} -- cgit v1.2.3 From 80494c198b07557713ae3d44811935fcd9b215da Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Mon, 4 Feb 2019 13:04:11 -0800 Subject: Add symlink from site to site-modules for compatibility --- site | 1 + 1 file changed, 1 insertion(+) create mode 120000 site diff --git a/site b/site new file mode 120000 index 0000000..5c6f04b --- /dev/null +++ b/site @@ -0,0 +1 @@ +site-modules/ \ No newline at end of file -- cgit v1.2.3 From baa4b92a8801df4ad026da13b0e0bd68c5cbdd3a Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Mon, 25 Feb 2019 09:08:36 -0800 Subject: Remove symlink site -> site-modules The symlink served for a good discussion point around change impact, but in the end having it makes for a more confusing experience overall both to new users cloning the control-repo to get started and also to anyone accustomed to "site". A new user won't miss "site". A symlink will muddy the waters over the change for long-time users. Better for clarity to be all-in and not include a symlink. --- site | 1 - 1 file changed, 1 deletion(-) delete mode 120000 site diff --git a/site b/site deleted file mode 120000 index 5c6f04b..0000000 --- a/site +++ /dev/null @@ -1 +0,0 @@ -site-modules/ \ No newline at end of file -- cgit v1.2.3 From c74c84d243b8c754f4e4b0342d334c63eb64227d Mon Sep 17 00:00:00 2001 From: Reid Vandewiele Date: Mon, 25 Feb 2019 09:13:35 -0800 Subject: Update README to reflect site -> site-modules --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ac57c92..808091f 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ The important files and items in this template are as follows: * An example Hiera configuration file and data directory with pre-created common.yaml and nodes directory. * These match the default hierarchy that ships with PE. * An [environment.conf](https://puppet.com/docs/puppet/5.3/config_file_environment.html) that correctly implements: - * A site directory for roles, profiles, and any custom modules for your organization. - * A config_version script. -* An example [config_version](https://puppet.com/docs/puppet/5.3/config_file_environment.html#configversion) script that outputs the git commit ID of the code that was used during a Puppet run. + * A site-modules directory for roles, profiles, and any custom modules for your organization. + * A config\_version script. +* An example [config\_version](https://puppet.com/docs/puppet/5.3/config_file_environment.html#configversion) script that outputs the git commit ID of the code that was used during a Puppet run. Here's a visual representation of the structure of this repository: @@ -36,7 +36,7 @@ control-repo/ │   ├── code_manager_config_version.rb # A config_version script for Code Manager. │   ├── config_version.rb # A config_version script for r10k. │   └── config_version.sh # A wrapper that chooses the appropriate config_version script. -├── site/ # This directory contains site-specific modules and is added to $modulepath. +├── site-modules/ # This directory contains site-specific modules and is added to $modulepath. │   ├── profile/ # The profile module. │   └── role/ # The role module. ├── LICENSE -- cgit v1.2.3