Commit Graph

8 Commits

Author SHA1 Message Date
Nate McCurdy
36a2784275 Resolve Rubocop warnings
* Removed the useless assignment in the config_version.rb error catching
* Single quote vs. double quote in Puppetfile
2018-05-08 10:46:30 -07:00
Nate McCurdy
e5189b5515 Show the short hostname, not the FQDN in config_version
This is mainly a style and readability change.

Prior to this, on masters whose hostname is actually their FQDN, the
config_version script would show the entire FQDN. On nodes with really
longs FQDN's, it was not very nice to look at.

This takes the hostname of the master, splits it on dots (.) and takes
the first segment.

Now this: compile-master-02.int.lab.dmz.company-name.net-production-48fd18ab
Is this:  compile-master-02-production-48fd18ab
2017-12-15 12:52:14 -06:00
Nate McCurdy
09df4b4961 Use the puppet-agent ruby in config_version.rb
Prior to this, the config_version.rb script (used for r10k) attempted to
use the system ruby to parse the script. This caused problems on Puppet
masters that don't have `ruby` in PATH.

This fixes that by hardcoding the puppet-agent's ruby in the shebang.
2017-12-15 12:48:47 -06:00
Nate McCurdy
124b1a2727 config_version: Show the compiling master's name
Prior to this, the config_version script just showed the commit ID of
the version of code being compiled. This commit includes the compiling
Puppet master's hostname and environment name in the config_version.
This is very useful for debugging when a Puppet master is failing and
you have multiple masters behind a load balancer.

The output of config_version now looks like this:

pupmaster01-production-ac9785273a10
2017-07-05 17:09:51 -07:00
Nick Walker
c9931ceef7 Add ruby shebang to config_version scripts
Prior to this commit, if you used windows bash git when you clone
down the repo these files would get incorrect permissions which
make them unexecutable.

After this commit, due to some windows bash git magic I don't
understand it appears that adding the shebang to the beginning of
the file causes windows bash git to change the permissions to
so the file is executable.

This resolves https://github.com/puppetlabs/control-repo/issues/40
2016-11-22 13:20:15 -08:00
Ranjit Viswakumar
c2bd0d3ca1 Check for rugged or output UNIX epoch 2015-11-20 14:13:17 +00:00
Nick Walker
869a5c3aa9 Update file permsissions to be 755 on scripts 2015-08-31 13:20:43 -07:00
Nick Walker
568978d76f pulling some stuff from npwalker/control-repo 2015-08-25 11:47:19 -07:00