theforeman/puppet-foreman — pull request #192 by domcleal (2014-05-14 10:48:14+00:00)
Title: Add foreman::cli class to install Hammer

[root@foreman-el6 foreman]# foreman-installer --enable-foreman-cli -v
[ INFO 2014-05-14 11:44:49 verbose] Running validation checks
[ INFO 2014-05-14 11:44:50 verbose] Executing hooks in group pre
[ WARN 2014-05-14 11:44:50 verbose] Hook 'Kafo::HookContext' is using block with arguments which is DEPRECATED, access to kafo instance is provided by hook DSL, please remove |kafo| from your hook block
[ INFO 2014-05-14 11:44:50 verbose] All hooks in group pre finished
[ INFO 2014-05-14 11:44:50 verbose] Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/facter_dot_d.rb
[ INFO 2014-05-14 11:44:50 verbose] Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/root_home.rb
[ INFO 2014-05-14 11:44:50 verbose] Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/pe_version.rb
[ INFO 2014-05-14 11:44:50 verbose] Loading facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/puppet_vardir.rb
[ INFO 2014-05-14 11:44:50 verbose] Loading facts in /usr/share/foreman-installer/modules/concat/lib/facter/concat_basedir.rb
[ INFO 2014-05-14 11:44:50 verbose] Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/iptables_version.rb
[ INFO 2014-05-14 11:44:50 verbose] Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/ip6tables_version.rb
[ INFO 2014-05-14 11:44:50 verbose] Loading facts in /usr/share/foreman-installer/modules/firewall/lib/facter/iptables_persistent_version.rb
[ INFO 2014-05-14 11:44:59 verbose] Applying configuration version '1400064290'
[ INFO 2014-05-14 11:45:00 verbose] ''
[ WARN 2014-05-14 11:45:00 verbose] /File[/root/.hammer]/ensure: created
[ WARN 2014-05-14 11:45:00 verbose] /File[/root/.hammer/cli.modules.d]/ensure: created
[ WARN 2014-05-14 11:45:00 verbose] /File[/root/.hammer/cli.modules.d/foreman.yml]/ensure: created
[ INFO 2014-05-14 11:45:01 verbose] '
[ INFO 2014-05-14 11:46:48 verbose] '
[ WARN 2014-05-14 11:46:48 verbose] /Stage[main]/Foreman::Cli/Package[foreman-cli]/ensure: created
[ WARN 2014-05-14 11:46:48 verbose] /File[/etc/hammer/cli.modules.d/foreman.yml]/content:
[ INFO 2014-05-14 11:46:48 verbose] --- /etc/hammer/cli.modules.d/foreman.yml	2014-04-30 14:24:33.000000000 +0100
[ INFO 2014-05-14 11:46:48 verbose] +++ /tmp/puppet-file20140514-10631-1mrx0ub-0	2014-05-14 11:46:48.366000087 +0100
[ INFO 2014-05-14 11:46:48 verbose] @@ -1,5 +1,6 @@
[ INFO 2014-05-14 11:46:48 verbose] :foreman:
[ INFO 2014-05-14 11:46:48 verbose] - :enable_module: true
[ INFO 2014-05-14 11:46:48 verbose] - :host: 'https://localhost/'
[ INFO 2014-05-14 11:46:48 verbose] - :username: 'admin'
[ INFO 2014-05-14 11:46:48 verbose] - :password: 'changeme'
[ INFO 2014-05-14 11:46:48 verbose] + # Enable/disable foreman commands
[ INFO 2014-05-14 11:46:48 verbose] + :enable_module: true
[ INFO 2014-05-14 11:46:48 verbose] +
[ INFO 2014-05-14 11:46:48 verbose] + # Your foreman server address
[ INFO 2014-05-14 11:46:48 verbose] + :host: 'https://foreman-el6.example.com'
[ INFO 2014-05-14 11:46:48 verbose] FileBucket adding {md5}ae7be3b7f719856c73414d033a445880
[ INFO 2014-05-14 11:46:48 verbose] /File[/etc/hammer/cli.modules.d/foreman.yml]: Filebucketed /etc/hammer/cli.modules.d/foreman.yml to puppet with sum ae7be3b7f719856c73414d033a445880
[ WARN 2014-05-14 11:46:48 verbose] /File[/etc/hammer/cli.modules.d/foreman.yml]/content: content changed '{md5}ae7be3b7f719856c73414d033a445880' to '{md5}af92bd0108176412a553fac84f44131b'
[ WARN 2014-05-14 11:46:48 verbose] /File[/etc/hammer/cli.modules.d/foreman.yml]/mode: mode changed '0755' to '0600'
[ WARN 2014-05-14 11:47:06 verbose] Finished catalog run in 127.85 seconds
[ INFO 2014-05-14 11:47:07 verbose] Puppet has finished, bye!
[ INFO 2014-05-14 11:47:07 verbose] Executing hooks in group post
[ INFO 2014-05-14 11:47:07 verbose] All hooks in group post finished
Success!
* Foreman is running at https://foreman-el6.example.com
Default credentials are 'admin:changeme'
* Foreman Proxy is running at https://foreman-el6.example.com:8443
* Puppetmaster is running at port 8140
The full log is at /var/log/foreman-installer/foreman-installer.log
[root@foreman-el6 foreman]# hammer host list
---|-------------------------|---------------------|---------------|-----------------|------------------
ID | NAME | OPERATING SYSTEM ID | HOST GROUP ID | IP | MAC
---|-------------------------|---------------------|---------------|-----------------|------------------
2 | foreman-el6.example.com | 1 | | 192.168.122.176 | 52:54:00:27:02:f1
---|-------------------------|---------------------|---------------|-----------------|------------------