mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
Updated to proper paths
This commit is contained in:
parent
b0374f7ff4
commit
b77729948d
11 changed files with 10 additions and 7 deletions
9
puppet/production/Puppetfile
Normal file
9
puppet/production/Puppetfile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# rubocop:disable FileName
|
||||
forge 'http://forge.puppetlabs.com'
|
||||
|
||||
#moduledir '~/.dotfiles/vendor/puppet_modules'
|
||||
moduledir "#{File.dirname(File.dirname(__FILE__))}/vendor/puppet_modules"
|
||||
|
||||
mod 'homebrew',
|
||||
:git => 'https://github.com/boxen/puppet-homebrew.git'
|
||||
mod 'puppetlabs-vcsrepo', '1.5.0'
|
||||
2
puppet/production/environment.conf
Normal file
2
puppet/production/environment.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
modulepath = modules:site:$basemodulepath
|
||||
config_version = 'scripts/config_version.sh $environmentpath $environment'
|
||||
1
puppet/production/hieradata/common.yaml
Normal file
1
puppet/production/hieradata/common.yaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
---
|
||||
1
puppet/production/hieradata/nodes/example-node.yaml
Normal file
1
puppet/production/hieradata/nodes/example-node.yaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
---
|
||||
12
puppet/production/manifests/site.pp
Normal file
12
puppet/production/manifests/site.pp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
## site.pp ##
|
||||
|
||||
# DEFAULT NODE
|
||||
|
||||
# The default node definition matches any node lacking a more specific node
|
||||
# definition. If there are no other nodes in this file, classes declared here
|
||||
# will be included in every node's catalog, *in addition* to any classes
|
||||
# specified in the via an ENC for that node.
|
||||
|
||||
node default {
|
||||
notify{'This is from the default node.':}
|
||||
}
|
||||
23
puppet/production/scripts/config_version.rb
Executable file
23
puppet/production/scripts/config_version.rb
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env ruby
|
||||
begin
|
||||
require 'rugged'
|
||||
rescue LoadError
|
||||
t = Time.new
|
||||
puts t.to_i
|
||||
else
|
||||
environmentpath = ARGV[0]
|
||||
environment = ARGV[1]
|
||||
|
||||
repo = Rugged::Repository.discover(File.join(environmentpath, environment))
|
||||
head = repo.head
|
||||
|
||||
# sha1 hash of the newest commit
|
||||
head_sha = head.target_id
|
||||
|
||||
# the commit message associated the newest commit
|
||||
# commit = repo.lookup(head_sha)
|
||||
|
||||
# add something to find the remote url
|
||||
|
||||
puts head_sha
|
||||
end
|
||||
12
puppet/production/scripts/config_version.sh
Executable file
12
puppet/production/scripts/config_version.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
if [ -e $1/$2/.r10k-deploy.json ]
|
||||
then
|
||||
/opt/puppetlabs/puppet/bin/ruby $1/$2/scripts/code_manager_config_version.rb $1 $2
|
||||
elif [ -e /opt/puppetlabs/server/pe_version ]
|
||||
then
|
||||
/opt/puppetlabs/puppet/bin/ruby $1/$2/scripts/config_version.rb $1 $2
|
||||
else
|
||||
/usr/bin/git --version > /dev/null 2>&1 &&
|
||||
/usr/bin/git --git-dir $1/$2/.git rev-parse HEAD ||
|
||||
date +%s
|
||||
fi
|
||||
4
puppet/production/site/profile/manifests/base.pp
Normal file
4
puppet/production/site/profile/manifests/base.pp
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# the base profile should include component modules that will be on all nodes
|
||||
class profile::base {
|
||||
|
||||
}
|
||||
7
puppet/production/site/role/manifests/server.pp
Normal file
7
puppet/production/site/role/manifests/server.pp
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Includes all the profiles needed for a server.
|
||||
# One big difference between this and the workstation role is that you generally
|
||||
# are not standing in front of the system and / or there is no graphical
|
||||
# interface.
|
||||
class role::server {
|
||||
include ::profile::base
|
||||
}
|
||||
4
puppet/production/site/role/manifests/workstation.pp
Normal file
4
puppet/production/site/role/manifests/workstation.pp
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Includes all the profiles needed for a workstation
|
||||
class role::workstation {
|
||||
include ::profile::base
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue