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
set term=ansi | |
colorscheme desert | |
set backspace=indent,eol,start | |
syntax enable |
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 | |
# Hook for Foreman/FreeIPA Integration | |
# Stephen Benjamin <[email protected]> | |
# 11.11.2013 | |
. /etc/sysconfig/foreman-ipa | |
action=$1 # create or destroy | |
target=$2 # hostname |
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
#kind: PXELinux | |
#name: Community Kickstart PXE | |
#oses: | |
#- CentOS 5 | |
#- CentOS 6 | |
#- Fedora 16 | |
#- Fedora 17 | |
#- Fedora 18 | |
#- Fedora 19 | |
#- RedHat 5 |
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
class apache::version { | |
case $::osfamily { | |
'RedHat': { | |
if $::operatingsystem == "Fedora" && $::operatingsystemrelease >= 18 { | |
apache_version = 2.4 | |
} else { | |
apache_version = 2.2 | |
} | |
} | |
'Debian': { |
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
test "should not save if root password is undefined and host is managed" do | |
Setting[:root_pass] = nil | |
host = Host.create :name => "myfullhost", :managed => true | |
assert !host.valid? | |
assert host.errors[:root_pass].include?("should not be blank") | |
end | |
test "should save if root password is undefined when the compute resource is image capapble" | |
Setting[:root_pass] = nil | |
host = Host.create :name => "myfullhost", :managed => true, :compute_resource_id => compute_resources(:openstack).id |
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
[stbenjam@foreman-dev foreman]$ rails c test | |
For some operations a user must be set, try User.current = User.first | |
Loading test environment (Rails 3.2.16) | |
1.9.3-p448 :001 > host = Host.new :name => "myfullhost", :managed => true | |
[...] | |
1.9.3-p448 :003 > host.valid? | |
=> false | |
1.9.3-p448 :004 > host.errors[:root_pass].any? | |
=> true |
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
class AddIndexToLowerLogin < ActiveRecord::Migration | |
def up | |
execute "CREATE INDEX lower_login ON users (LOWER(login))" if ActiveRecord::Base.connection.instance_of? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter | |
end | |
def down | |
execute "DROP INDEX lower_login" if ActiveRecord::Base.connection.instance_of? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter; | |
end | |
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
E.g. | |
POST https://gatebuilder.bitbin.de/api/v2/smart_class_parameters/enable_sudo/override_values | |
{ | |
"override_value": { | |
"match": "fqdn=asgard.bitbin.de", | |
"value": "unicorns" | |
} | |
} |
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
[root@katello katello-deploy]# yum repolist | |
Loaded plugins: product-id, rhnplugin, subscription-manager | |
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. | |
This system is receiving updates from RHN Classic or RHN Satellite. | |
repo id repo name status | |
SCL CentOS-6Server - SCL 532 | |
epel Extra Packages for Enterprise Linux 6 - x86_64 10,724 | |
foreman Foreman nightly |
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
network --bootproto static --ip=<%= @host.ip %> --netmask=<%= @host.subnet.mask %> --gateway=<%= @host.subnet.gateway %> --nameserver=<%= [@host.subnet.dns_primary,@host.subnet.dns_secondary].reject{|n| n.blank?}.join(',') %> --hostname <%= @host %> |
OlderNewer