[ INFO 2015-08-04 10:02:48 Init] Initialization of Hammer CLI (0.2.0) has started... [DEBUG 2015-08-04 10:02:48 Init] Running at ruby 1.8.7-p374 [ INFO 2015-08-04 10:02:48 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2015-08-04 10:02:48 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2015-08-04 10:02:48 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded [DEBUG 2015-08-04 10:02:49 Connection] Registered: foreman [DEBUG 2015-08-04 10:02:49 API] Global headers: { :content_type => "application/json", "Accept-Language" => "en", :accept => "application/json;version=2" } [ INFO 2015-08-04 10:02:49 Modules] Extension module hammer_cli_foreman (0.2.0) loaded [DEBUG 2015-08-04 10:02:49 Init] Using locale 'en' [DEBUG 2015-08-04 10:02:49 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/locale' [DEBUG 2015-08-04 10:02:49 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/locale' [ INFO 2015-08-04 10:02:49 HammerCLI::MainCommand] Called with options: {"option_username"=>"jvandewege", "option_debug"=>true} [ INFO 2015-08-04 10:02:49 HammerCLIForeman::Host] Called with options: {} [ INFO 2015-08-04 10:02:49 HammerCLIForeman::Host::UpdateCommand] Called with options: {"option_user_id"=>"4", "option_owner_type"=>"Usergroup", "option_name"=>"aptcacher01.nieuwland.nl", "option_interface_list"=>[], "option_volume_list"=>[]} [ INFO 2015-08-04 10:02:50 API] GET /api/hosts [DEBUG 2015-08-04 10:02:50 API] Params: { :search => "name = \"aptcacher01.nieuwland.nl\"" } [DEBUG 2015-08-04 10:02:50 API] Headers: { :params => { :search => "name = \"aptcacher01.nieuwland.nl\"" } } [DEBUG 2015-08-04 10:02:54 API] Response: { "search" => "name = \"aptcacher01.nieuwland.nl\"", "page" => 1, "per_page" => 200, "subtotal" => 1, "total" => 111, "results" => [ [0] { "updated_at" => "2015-08-04T07:53:44Z", "created_at" => "2015-03-13T12:14:15Z", "image_file" => "", "model_id" => 1, "operatingsystem_name" => "Debian 7.8", "hostgroup_id" => 8, "operatingsystem_id" => 7, "compute_resource_name" => nil, "managed" => false, "enabled" => true, "comment" => "", "realm_id" => nil, "serial" => nil, "provision_method" => "build", "compute_profile_name" => nil, "model_name" => "oVirt Node", "sp_subnet_id" => nil, "sp_ip" => nil, "mac" => "00:1a:4a:10:10:df", "certname" => "aptcacher01.nieuwland.nl", "subnet_id" => nil, "architecture_name" => "x86_64", "environment_id" => 1, "image_name" => nil, "puppet_ca_proxy_id" => 1, "ptable_id" => nil, "architecture_id" => 1, "sp_name" => nil, "sp_mac" => nil, "name" => "aptcacher01.nieuwland.nl", "disk" => nil, "medium_name" => nil, "domain_name" => "nieuwland.nl", "capabilities" => [ [0] "build" ], "hostgroup_name" => "standaard-linux/linux-debian", "subnet_name" => nil, "puppet_status" => 0, "source_file_id" => nil, "compute_profile_id" => nil, "uuid" => nil, "use_image" => nil, "build" => false, "medium_id" => nil, "ptable_name" => nil, "last_freshcheck" => nil, "last_compile" => "2015-08-04T07:53:35Z", "image_id" => nil, "installed_at" => nil, "domain_id" => 1, "last_report" => "2015-08-04T07:53:29Z", "environment_name" => "production", "id" => 110, "puppet_proxy_id" => 1, "compute_resource_id" => nil, "owner_type" => "User", "owner_id" => 3, "realm_name" => nil, "ip" => "172.19.1.24" } ], "sort" => { "by" => nil, "order" => nil } } [DEBUG 2015-08-04 10:02:54 API] Response headers: { :x_runtime => "4.242472", :status => "200 OK", :set_cookie => [ [0] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWJiZWZmMjQwNGU0OTcyM2RjY2FlNWJiYWY4OGE0MGJhBjsAVEkiC2xvY2FsZQY7AEYiB2Vu--9aa3b0901d9317c4fc646fcb2a074151e0e2d635; path=/; HttpOnly", [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" ], :x_rack_cache => "miss", :foreman_version => "1.8.2", :foreman_api_version => "2", :cache_control => "must-revalidate, private, max-age=0", :content_type => "application/json; charset=utf-8", :x_ua_compatible => "IE=Edge,chrome=1", :etag => "\"0ff4b04b106e3971637fe43bc66cd3b8\"", :x_request_id => "9a9ee72fc8e19ebfab69c8952f86fb01", :x_powered_by => "Phusion Passenger 4.0.18", :date => "Tue, 04 Aug 2015 08:02:50 GMT", :transfer_encoding => "chunked", :apipie_checksum => "9eb13649592020782c038c8cd4e5843c", :server => "Apache/2.2.15 (CentOS)", :connection => "close" } [ INFO 2015-08-04 10:02:54 API] PUT /api/hosts/110 [DEBUG 2015-08-04 10:02:54 API] Params: { "host" => { "interfaces_attributes" => {}, "compute_attributes" => { "volumes_attributes" => {} }, "host_parameters_attributes" => {}, "name" => "aptcacher01.nieuwland.nl", "owner_id" => "4", "owner_type" => "Usergroup" } } [DEBUG 2015-08-04 10:02:54 API] Headers: {} [DEBUG 2015-08-04 10:02:58 API] Response: { "puppetclasses" => [], "updated_at" => "2015-08-04T08:02:58Z", "created_at" => "2015-03-13T12:14:15Z", "image_file" => "", "model_id" => 1, "operatingsystem_name" => "Debian 7.8", "hostgroup_id" => 8, "operatingsystem_id" => 7, "all_puppetclasses" => [ [ 0] { "module_name" => "apt", "name" => "apt", "id" => 292 }, [ 1] { "module_name" => "apt", "name" => "apt::unattended_upgrades", "id" => 293 }, [ 2] { "module_name" => "git", "name" => "git", "id" => 93 }, [ 3] { "module_name" => "git", "name" => "git::client", "id" => 94 }, [ 4] { "module_name" => "ntp", "name" => "ntp", "id" => 3 }, [ 5] { "module_name" => "nwld_admintools", "name" => "nwld_admintools", "id" => 16 }, [ 6] { "module_name" => "nwld_bashrc", "name" => "nwld_bashrc", "id" => 213 }, [ 7] { "module_name" => "nwld_cronjobs", "name" => "nwld_cronjobs", "id" => 297 }, [ 8] { "module_name" => "nwld_ldap", "name" => "nwld_ldap", "id" => 287 }, [ 9] { "module_name" => "nwld_nrpe", "name" => "nwld_nrpe", "id" => 205 }, [10] { "module_name" => "nwld_os", "name" => "nwld_os", "id" => 288 }, [11] { "module_name" => "nwld_rsync", "name" => "nwld_rsync::base", "id" => 18 }, [12] { "module_name" => "nwld_snmp", "name" => "nwld_snmp", "id" => 203 }, [13] { "module_name" => "nwld_sshkeys", "name" => "nwld_sshkeys", "id" => 198 }, [14] { "module_name" => "nwld_vim", "name" => "nwld_vim", "id" => 24 }, [15] { "module_name" => "role_backup", "name" => "role_backup", "id" => 361 }, [16] { "module_name" => "timezone", "name" => "timezone", "id" => 12 } ], "interfaces" => [ [0] { "identifier" => "eth0", "mac" => "00:1a:4a:10:10:df", "provision" => true, "name" => "aptcacher01.nieuwland.nl", "primary" => true, "type" => "interface", "ip" => "172.19.1.24", "id" => 262 } ], "parameters" => [], "compute_resource_name" => nil, "managed" => false, "enabled" => true, "comment" => "", "realm_id" => nil, "serial" => nil, "provision_method" => "build", "compute_profile_name" => nil, "model_name" => "oVirt Node", "sp_subnet_id" => nil, "sp_ip" => nil, "mac" => "00:1a:4a:10:10:df", "certname" => "aptcacher01.nieuwland.nl", "subnet_id" => nil, "architecture_name" => "x86_64", "environment_id" => 1, "image_name" => nil, "puppet_ca_proxy_id" => 1, "ptable_id" => nil, "architecture_id" => 1, "sp_name" => nil, "sp_mac" => nil, "name" => "aptcacher01.nieuwland.nl", "disk" => nil, "medium_name" => nil, "domain_name" => "nieuwland.nl", "capabilities" => [ [0] "build" ], "hostgroup_name" => "standaard-linux/linux-debian", "subnet_name" => nil, "config_groups" => [], "puppet_status" => 0, "source_file_id" => nil, "compute_profile_id" => nil, "uuid" => nil, "use_image" => nil, "build" => false, "medium_id" => nil, "ptable_name" => nil, "last_freshcheck" => nil, "last_compile" => "2015-08-04T07:53:35Z", "image_id" => nil, "installed_at" => nil, "domain_id" => 1, "last_report" => "2015-08-04T07:53:29Z", "environment_name" => "production", "id" => 110, "puppet_proxy_id" => 1, "compute_resource_id" => nil, "owner_type" => "Usergroup", "owner_id" => 4, "realm_name" => nil, "ip" => "172.19.1.24" } [DEBUG 2015-08-04 10:02:58 API] Response headers: { :x_runtime => "4.328310", :status => "200 OK", :set_cookie => [ [0] "request_method=PUT; path=/", [1] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTZlZmQwODY5YmFlNDgyMWRiZDAwODE4ZjY0MDY0ZmE0BjsAVEkiC2xvY2FsZQY7AEYiB2Vu--f484d42126142677d0a618231e12f78e8614fa5a; path=/; HttpOnly" ], :x_rack_cache => "invalidate, pass", :foreman_version => "1.8.2", :foreman_api_version => "2", :cache_control => "max-age=0, private, must-revalidate", :content_type => "application/json; charset=utf-8", :x_ua_compatible => "IE=Edge,chrome=1", :etag => "\"6713bc662b5ebf96f5f306c1ead82785\"", :x_request_id => "5f418f8e9c7e4a6ed5cff3b99a20bed1", :x_powered_by => "Phusion Passenger 4.0.18", :date => "Tue, 04 Aug 2015 08:02:54 GMT", :transfer_encoding => "chunked", :apipie_checksum => "9eb13649592020782c038c8cd4e5843c", :server => "Apache/2.2.15 (CentOS)", :connection => "close" } Host updated