virsh iface-bridge eth0 br0
- If you had
NM_CONTROLLED=no
in there, re-add it to both ifcfg files because virsh probably just removed it for you.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Format: | |
# <classname>: false - don't include this class | |
# <classname>: true - include and use the defaults | |
# <classname>: | |
# <param>: <value> - include and override the default(s) | |
# | |
# See params.pp in each class for what options are available | |
--- | |
foreman: true | |
foreman: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SPEC := $(wildcard *.spec) | |
ARCHS := $(shell spec-archs $(SPEC)) | |
DEFINES := --define "_sourcedir $(shell pwd)" | |
DEFINES += --define "_srcrpmdir $(shell pwd)" | |
DEFINES += --define "_rpmdir $(shell pwd)" | |
SRPMS := $(wildcard *.src.rpm) | |
MOCKDIR := "$(shell pwd)/mock" | |
RPMBUILD := rpmbuild-md5 | |
#MOCKOPTS := --no-cleanup-after |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :my_tasks do | |
desc "CSV output" | |
task :csv => :environment do | |
require 'csv' | |
hosts = Host.all | |
CSV.open('/tmp/hosts.csv', 'w') do |writer| | |
hosts.each do |h| | |
row_array = [ h.name, h.operatingsystem, h.environment, h.model, h.facts_hash["memorysize"] ] | |
writer << row_array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Check if variable is defined | |
# Replaces has_variable?(var) and if @var variations. | |
# include?() pattern from @Jan_vStone. | |
# | |
# scope.lookupvar return values for undefined variables: | |
# Puppet 3.x: nil | |
# Puppet 2.6.x: :undefined | |
# Puppet 2.7.x: :undefined | |
<% if ! [:undefined, nil, ''].include?(masquerade_address = scope.lookupvar('ftp::masquerade_address')) -%> | |
MasqueradeAddress <%= masquerade_address %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Several other articles written about similar setups but | |
# this seems like the most simple one if you're already using | |
# Passenger under Apache | |
# | |
# http://paperairoplane.net/?p=380 | |
# http://www.masterzen.fr/2010/03/21/more-puppet-offloading/ | |
# | |
# Add %D for "The time taken to serve the request, in microseconds." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -up proftpd-1.3.4b/src/mkhome.c.CreateHome proftpd-1.3.4b/src/mkhome.c | |
--- proftpd-1.3.4b/src/mkhome.c.CreateHome 2012-08-14 20:35:35.992192002 +0200 | |
+++ proftpd-1.3.4b/src/mkhome.c 2012-08-14 20:35:46.295209351 +0200 | |
@@ -289,7 +289,7 @@ int create_home(pool *p, const char *hom | |
dst_mode = *((mode_t *) c->argv[1]); | |
- PRIVS_ROOT | |
+ PRIVS_USER | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -up ./app/models/host.rb.orig ./app/models/host.rb | |
--- ./app/models/host.rb.orig 2011-12-26 12:55:29.000000000 +0000 | |
+++ ./app/models/host.rb 2012-01-03 10:23:08.650399870 +0000 | |
@@ -16,7 +16,7 @@ class Host < Puppet::Rails::Host | |
class Jail < Safemode::Jail | |
allow :name, :diskLayout, :puppetmaster, :operatingsystem, :os, :environment, :ptable, :hostgroup, :url_for_boot, | |
- :params, :hostgroup, :domain, :ip, :mac, :shortname, :architecture | |
+ :params, :hostgroup, :domain, :ip, :mac, :shortname, :model | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the interactive ruby shell: | |
# paste in: | |
require 'digest/sha1' | |
def encrypt_password(pass) | |
password_salt = Digest::SHA1.hexdigest([Time.now, rand].join) | |
password_hash = Digest::SHA1.hexdigest([pass, password_salt].join) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# IRC notification post-receive hook. | |
# Based on https://wiki.icinga.org/display/community/GIT+Commit+Bot | |
# | |
# Author: Mikael Fridh <frimik@gmail.com> | |
# | |
# This script pulls out the commit information and sends it to | |
# the Notify plugin in supybot via localhost 5050. | |
# |