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
If you lost some info from dhcpd.conf and want to retrieve the old copy, | |
puppet would have stored the overwritten configuration files in the | |
Filebucket. You'd see something like this in the installer logs: | |
/Stage[main]/Dhcp/File[/etc/dhcp/dhcpd.conf]: Filebucketed | |
/etc/dhcp/dhcpd.conf to puppet with sum | |
622d9820b8e764ab124367c68f5fa3a1 | |
And it's restorable with: |
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
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
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
#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
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
/etc/salt/master: | |
external_auth: | |
pam: | |
saltuser: | |
- '@runner' | |
rest_cherrypy: | |
port: 9191 |
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
#!/usr/bin/env ruby | |
# This is the external nodes script to allow Salt to retrieve info about a host | |
# from Foreman. It also uploads a node's grains to Foreman, if the setting is | |
# enabled. | |
require 'yaml' | |
$settings_file = '/etc/salt/foreman.yaml' | |
SETTINGS = YAML.load_file($settings_file) |
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
log { | |
module: DEFAULT | |
enable: debug+ | |
timestamp: true | |
output: /var/log/qdrouterd.log | |
} |
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
echo 'ForemanTasks::Task.where(:label => "Actions::Candlepin::ListenOnCandlepinEvents", :state => "running").map { |task| task.update_column(:state, "stopped") }' | foreman-rake console |