Skip to content

Instantly share code, notes, and snippets.

View GregSutcliffe's full-sized avatar

Greg "Gwmngilfen" Sutcliffe GregSutcliffe

  • Red Hat
  • Scotland
View GitHub Profile
acng.conf:
Remap-uburep: file:ubuntu_mirrors /ubuntu ; file:backends_ubuntu # Ubuntu Archives
backends_ubuntu:
http://gb.archive.ubuntu.com/ubuntu/
ubuntu_mirrors: # 624 lines of mirrors like this...
http://aw.archive.ubuntu.com/ubuntu/
http://ax.archive.ubuntu.com/ubuntu/
http://az.archive.ubuntu.com/ubuntu/
http://76.73.4.58/ubuntu/
http://ac.archive.ubuntu.com/ubuntu/
http://ad.archive.ubuntu.com/ubuntu/
http://ae.archive.ubuntu.com/ubuntu/
http://af.archive.ubuntu.com/ubuntu/
http://ag.archive.ubuntu.com/ubuntu/
http://ai.archive.ubuntu.com/ubuntu/
http://al.archive.ubuntu.com/ubuntu/
http://am.archive.ubuntu.com/ubuntu/
http://an.archive.ubuntu.com/ubuntu/
diff --git a/manifests/install.pp b/manifests/install.pp
index 4c3d366..27931f0 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -1,6 +1,9 @@
class foreman::install {
if ! $foreman::custom_repo {
- foreman::install::repos { 'foreman': use_testing => $foreman::use_testing }
+ foreman::install::repos { 'foreman':
+ use_testing => $foreman::use_testing,
if $foreman::foreman_url == undef {
class { 'foreman::puppetmaster': url => 'some.params.from.user' }
} else {
class { 'foreman::puppetmaster': url => $foreman::foreman_url }
}
irb(main):002:0> require 'puppet'
=> true
irb(main):003:0> Puppet.clear
=> {}
irb(main):004:0> Puppet[:config]='/etc/puppet/puppet.conf'
=> "/etc/puppet/puppet.conf"
irb(main):005:0> Puppet.parse_config
=> #<EventLoop::Timer:0x7fbaf8950cd0 @running=false, @start_time=Tue Jul 03 15:45:32 +0100 2012, @event_loop=#<EventLoop:0x7fbaf8950a50 @running=false, @notify_snk=#<IO:0x7fbaf8950690>, @timers=[#<EventLoop::Timer:0x7fbaf8950cd0 ...>], @notify_src=#<IO:0x7fbaf89506b8>, @wakeup_time=nil, @ios={:exceptional=>[], :readable=>[#<IO:0x7fbaf89506b8>], :writable=>[]}, @awake=false, @io_arrays=[[#<IO:0x7fbaf89506b8>], [], []]>, @allow_dynamic_signals=false, @tolerance=1.0, @signal_handlers={:alarm=>[#<Proc:0x00007fbafacdec88@/usr/lib/ruby/1.8/puppet/util/settings.rb:555>]}, @interval=15.0>
irb(main):006:0> conf = Puppet.settings.instance_variable_get(:@values)
=> {:master=>{:reports=>"foreman", :node_terminus=>"exec", :manifest=>"/etc/puppet/environments/$environment/manifests/site.pp", :modulepath=>"/e
diff --git a/lib/proxy/puppet/environment.rb b/lib/proxy/puppet/environment.rb
index 1939ec8..48f08eb 100644
--- a/lib/proxy/puppet/environment.rb
+++ b/lib/proxy/puppet/environment.rb
@@ -38,7 +38,7 @@ module Proxy::Puppet
end
if env.values.compact.size == 0
# fall back to defaults - we probably don't use environments
- env[:production] = conf[:main][:modulepath] || conf[:master][:modulepath]
+ env[:production] = conf[:main][:modulepath] || conf[:master][:modulepath] || '/etc/puppet/modules'
abstract-1.0.0
actionmailer-3.0.15
actionpack-3.0.15
activemodel-3.0.15
activerecord-3.0.15
activeresource-3.0.15
activesupport-3.0.15
acts_as_audited-2.0.0
ancestry-1.2.5
arel-2.0.10
Instead of:
<% scope.lookupvar('hosts').each do |host| -%>
<%= host['host']['name'].split('.')[0] %>=<%= host['host']['name'].split('.',2).last %>;<%= host["host"]["name"] %>:apache_activity. activity_80 \
<% end -%>
Try:
<% scope.lookupvar('hosts').map {|h| "#{h['host']['name'].split('.')[0]}=#{h['host']['name'].split('.',2).last}" }.join("\ \n") %>
<VirtualHost 172.20.10.10:80>
ServerName foreman.elysium.emeraldreverie.org
ServerAlias foreman
DocumentRoot /usr/share/foreman/public
PassengerAppRoot /usr/share/foreman
RailsAutoDetect On
AddDefaultCharset UTF-8
</VirtualHost>
root@foreman-test:~/foreman# bundle update
Updating https://github.com/jystewart/has_many_polymorphs.git
Fetching gem metadata from http://rubygems.org/......
Using rake (0.9.2.2)
Using abstract (1.0.0)
Using activesupport (3.0.15)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.15)
Using erubis (2.6.6)