File tree Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ forge "http://forge.puppetlabs.com"
2+
3+ # Modules from the Puppet Forge
4+ # Note the versions are all set to :latest but after you've
5+ # installed you should change them to the exact version you want
6+ mod "puppetlabs/inifile" , :latest
7+ mod "puppetlabs/stdlib" , :latest
8+ mod "puppetlabs/concat" , :latest
9+
10+ #An example of using a specific forge module version instead of latest
11+ #Notice the addition of single quotes
12+ #mod "puppetlabs/inifile", '1.3.0'
13+
14+ # Modules from Github using various references
15+ # Further examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples
16+ # update the tag to the most current release when implementing
17+ #mod 'hiera',
18+ # :git => 'https://github.com/hunner/puppet-hiera',
19+ # :tag => '1.3.1'
20+
21+ #mod 'notifyme',
22+ # :git => 'git://github.com/glarizza/puppet-notifyme',
23+ # :ref => '50c01703b2e3e352520a9a2271ea4947fe17a51f'
24+
25+ #mod 'profiles',
26+ # :git => 'git://github.com/glarizza/puppet-profiles',
27+ # :ref => '3611ae4253ff01762f9bda1d93620edf8f9a3b22'
28+
Original file line number Diff line number Diff line change 1+ modulepath = modules:site:$basemodulepath
2+ config_version = 'scripts/config_version.sh $environmentpath $environment'
3+
4+ # Environment timeout should be set to unlimited. When set to zero it is less performant.
5+ # When code is deployed the admin API of puppetserver should be used to force a refresh of code from disk.
6+ # https://docs.puppetlabs.com/puppetserver/1.0/release_notes.html#new-feature-admin-api-for-refreshing-environments
7+ # https://docs.puppetlabs.com/puppet/3.7/reference/environments_configuring.html#environmenttimeout
8+ environment_timeout = 0
Original file line number Diff line number Diff line change 1+ ---
2+ message : " This node is using common data"
Original file line number Diff line number Diff line change 1+ require 'rugged'
2+
3+ environmentpath = ARGV [ 0 ]
4+ environment = ARGV [ 1 ]
5+
6+ repo = Rugged ::Repository . discover ( File . join ( environmentpath , environment ) )
7+ head = repo . head
8+
9+ #sha1 hash of the newest commit
10+ head_sha = head . target_id
11+
12+ #the commit message associated the newest commit
13+ commit = repo . lookup ( head_sha )
14+
15+ #add something to find the remote url
16+
17+ puts head_sha
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if [ -e /opt/puppetlabs/server/pe_version ]
3+ then
4+ /opt/puppetlabs/puppet/bin/ruby $1 /$2 /scripts/config_version.rb $1 $2
5+ else
6+ /usr/bin/git --git-dir $1 /$2 /.git rev-parse HEAD
7+ fi
You can’t perform that action at this time.
0 commit comments