[root@foreman ~]# hammer -d host update --name f21-h18-000-r620.rdu2.scalelab.redhat.com --build 1 [ INFO 2019-05-31T15:25:33 Init] Initialization of Hammer CLI (0.14.0) has started... [DEBUG 2019-05-31T15:25:33 Init] Running at ruby 2.4.3-p205 [ INFO 2019-05-31T15:25:33 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2019-05-31T15:25:33 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2019-05-31T15:25:33 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded [DEBUG 2019-05-31T15:25:33 SSLoptions] SSL options: { :ssl_ca_file => "/etc/puppetlabs/puppet/ssl/certs/ca.pem", :verify_ssl => true } [DEBUG 2019-05-31T15:25:33 API] Global headers: { :content_type => "application/json", :accept => "application/json;version=2", "Accept-Language" => "en" } [DEBUG 2019-05-31T15:25:33 API] Follow redirects: never [DEBUG 2019-05-31T15:25:33 Connection] Registered: foreman [ INFO 2019-05-31T15:25:33 Modules] Extension module hammer_cli_foreman (0.14.0) loaded. [DEBUG 2019-05-31T15:25:33 Init] Using locale 'en' [DEBUG 2019-05-31T15:25:33 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.14.0/locale' [DEBUG 2019-05-31T15:25:33 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.14.0/locale' [ INFO 2019-05-31T15:25:33 HammerCLI::MainCommand] Called with options: {"option_debug"=>true} [ INFO 2019-05-31T15:25:33 HammerCLIForeman::Host] Called with options: {} [ INFO 2019-05-31T15:25:33 API] Server: https://foreman.rdu2.scalelab.redhat.com [ INFO 2019-05-31T15:25:33 API] GET /api/hosts [DEBUG 2019-05-31T15:25:33 API] Params: { :search => "name = \"f21-h18-000-r620.rdu2.scalelab.redhat.com\"" } [DEBUG 2019-05-31T15:25:33 API] Headers: { :params => { :search => "name = \"f21-h18-000-r620.rdu2.scalelab.redhat.com\"" } } [DEBUG 2019-05-31T15:25:33 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth [DEBUG 2019-05-31T15:25:33 API] Response: { "total" => 575, "subtotal" => 1, "page" => 1, "per_page" => 1000, "search" => "name = \"f21-h18-000-r620.rdu2.scalelab.redhat.com\"", "sort" => { "by" => nil, "order" => nil }, "results" => [ [0] { "ip" => "10.1.42.202", "ip6" => "", "environment_id" => 1, "environment_name" => "production", "last_report" => nil, "mac" => "b8:ca:3a:63:87:b0", "realm_id" => nil, "realm_name" => nil, "sp_mac" => nil, "sp_ip" => nil, "sp_name" => nil, "domain_id" => 1, "domain_name" => "rdu2.scalelab.redhat.com", "architecture_id" => 1, "architecture_name" => "x86_64", "operatingsystem_id" => 2, "operatingsystem_name" => "RHEL 7", "subnet_id" => 4, "subnet_name" => "rdu2_mgmt3", "subnet6_id" => nil, "subnet6_name" => nil, "sp_subnet_id" => nil, "ptable_id" => 107, "ptable_name" => "generic-rhel7", "medium_id" => 11, "medium_name" => "RHEL Local", "pxe_loader" => "PXELinux BIOS", "build" => true, "comment" => "", "disk" => "", "installed_at" => nil, "model_id" => nil, "hostgroup_id" => 2, "owner_id" => 4, "owner_name" => "Admin User", "owner_type" => "User", "enabled" => true, "managed" => true, "use_image" => nil, "image_file" => "", "uuid" => nil, "compute_resource_id" => nil, "compute_resource_name" => nil, "compute_profile_id" => nil, "compute_profile_name" => nil, "capabilities" => [ [0] "build" ], "provision_method" => "build", "certname" => "f21-h18-000-r620.rdu2.scalelab.redhat.com", "image_id" => nil, "image_name" => nil, "created_at" => "2019-03-12 18:58:02 UTC", "updated_at" => "2019-05-31 15:23:44 UTC", "last_compile" => nil, "global_status" => 0, "global_status_label" => "OK", "puppet_status" => 0, "model_name" => nil, "build_status" => 1, "build_status_label" => "Pending installation", "name" => "f21-h18-000-r620.rdu2.scalelab.redhat.com", "id" => 480, "puppet_proxy_id" => nil, "puppet_proxy_name" => nil, "puppet_ca_proxy_id" => nil, "puppet_ca_proxy_name" => nil, "puppet_proxy" => nil, "puppet_ca_proxy" => nil, "hostgroup_name" => "Production", "hostgroup_title" => "Production" } ] } [DEBUG 2019-05-31T15:25:33 API] Response headers: { :date => "Fri, 31 May 2019 15:25:33 GMT", :server => "Apache/2.4.6 (CentOS)", :foreman_version => "1.19.1", :foreman_api_version => "2", :apipie_checksum => "168c3600e744d9af1db2f53be93f02db2a338009", :cache_control => "max-age=0, private, must-revalidate", :x_request_id => "0c5970e6-e0ca-4d87-826d-da7365beaabd", :x_runtime => "0.135353", :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'", :strict_transport_security => "max-age=631139040; includeSubdomains", :x_content_type_options => "nosniff", :x_download_options => "noopen", :x_frame_options => "sameorigin", :x_permitted_cross_domain_policies => "none", :x_xss_protection => "1; mode=block", :x_powered_by => "Phusion Passenger 4.0.53", :set_cookie => [ [0] "_session_id=fd38469a7706a770be8bbd7ee72a90dd; path=/; secure; HttpOnly; SameSite=Lax" ], :etag => "W/\"d8aa88fb894015097e0ba14f576fa8b2-gzip\"", :status => "200 OK", :vary => "Accept-Encoding", :content_encoding => "gzip", :content_length => "728", :content_type => "application/json; charset=utf-8" } [ INFO 2019-05-31T15:25:33 HammerCLIForeman::Host::UpdateCommand] Called with options: {"option_puppetclass_ids"=>[], "option_volume_list"=>[], "option_interface_list"=>[], "option_name"=>"f21-h18-000-r620.rdu2.scalelab.redhat.com", "option_id"=>480, "option_build"=>true} [ INFO 2019-05-31T15:25:34 API] Server: https://foreman.rdu2.scalelab.redhat.com [ INFO 2019-05-31T15:25:34 API] PUT /api/hosts/480 [DEBUG 2019-05-31T15:25:34 API] Params: { "host" => { "name" => "f21-h18-000-r620.rdu2.scalelab.redhat.com", "puppetclass_ids" => [], "build" => true, "compute_attributes" => { "volumes_attributes" => {} }, "host_parameters_attributes" => [], "interfaces_attributes" => [] } } [DEBUG 2019-05-31T15:25:34 API] Headers: {} [DEBUG 2019-05-31T15:25:34 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth [DEBUG 2019-05-31T15:25:34 API] Response: { "ip" => "10.1.42.202", "ip6" => "", "environment_id" => 1, "environment_name" => "production", "last_report" => nil, "mac" => "b8:ca:3a:63:87:b0", "realm_id" => nil, "realm_name" => nil, "sp_mac" => nil, "sp_ip" => nil, "sp_name" => nil, "domain_id" => 1, "domain_name" => "rdu2.scalelab.redhat.com", "architecture_id" => 1, "architecture_name" => "x86_64", "operatingsystem_id" => 2, "operatingsystem_name" => "RHEL 7", "subnet_id" => 4, "subnet_name" => "rdu2_mgmt3", "subnet6_id" => nil, "subnet6_name" => nil, "sp_subnet_id" => nil, "ptable_id" => 107, "ptable_name" => "generic-rhel7", "medium_id" => 11, "medium_name" => "RHEL Local", "pxe_loader" => "PXELinux BIOS", "build" => true, "comment" => "", "disk" => "", "installed_at" => nil, "model_id" => nil, "hostgroup_id" => 2, "owner_id" => 4, "owner_name" => "Admin User", "owner_type" => "User", "enabled" => true, "managed" => true, "use_image" => nil, "image_file" => "", "uuid" => nil, "compute_resource_id" => nil, "compute_resource_name" => nil, "compute_profile_id" => nil, "compute_profile_name" => nil, "capabilities" => [ [0] "build" ], "provision_method" => "build", "certname" => "f21-h18-000-r620.rdu2.scalelab.redhat.com", "image_id" => nil, "image_name" => nil, "created_at" => "2019-03-12 18:58:02 UTC", "updated_at" => "2019-05-31 15:23:44 UTC", "last_compile" => nil, "global_status" => 0, "global_status_label" => "OK", "puppet_status" => 0, "model_name" => nil, "build_status" => 1, "build_status_label" => "Pending installation", "name" => "f21-h18-000-r620.rdu2.scalelab.redhat.com", "id" => 480, "puppet_proxy_id" => nil, "puppet_proxy_name" => nil, "puppet_ca_proxy_id" => nil, "puppet_ca_proxy_name" => nil, "puppet_proxy" => nil, "puppet_ca_proxy" => nil, "hostgroup_name" => "Production", "hostgroup_title" => "Production", "parameters" => [], "all_parameters" => [], "interfaces" => [ [0] { "id" => 830, "name" => "f21-h18-000-r620.rdu2.scalelab.redhat.com", "ip" => "10.1.42.202", "ip6" => "", "mac" => "b8:ca:3a:63:87:b0", "mtu" => 1500, "fqdn" => "f21-h18-000-r620.rdu2.scalelab.redhat.com", "identifier" => "em1", "primary" => true, "provision" => true, "type" => "interface" }, [1] { "id" => 831, "name" => "mgmt-f21-h18-000-r620.rdu2.scalelab.redhat.com", "ip" => "10.1.42.49", "ip6" => "", "mac" => "e0:db:55:12:db:06", "mtu" => 1500, "fqdn" => "mgmt-f21-h18-000-r620.rdu2.scalelab.redhat.com", "identifier" => "mgmt", "primary" => false, "provision" => false, "type" => "interface" } ], "puppetclasses" => [], "config_groups" => [], "all_puppetclasses" => [], "permissions" => { "view_hosts" => true, "create_hosts" => true, "edit_hosts" => true, "destroy_hosts" => true, "build_hosts" => true, "power_hosts" => true, "console_hosts" => true, "ipmi_boot_hosts" => true, "puppetrun_hosts" => true } } [DEBUG 2019-05-31T15:25:34 API] Response headers: { :date => "Fri, 31 May 2019 15:25:34 GMT", :server => "Apache/2.4.6 (CentOS)", :foreman_version => "1.19.1", :foreman_api_version => "2", :apipie_checksum => "168c3600e744d9af1db2f53be93f02db2a338009", :cache_control => "max-age=0, private, must-revalidate", :x_request_id => "8935317a-e2cf-4e97-9ab6-009a33f0651f", :x_runtime => "0.381676", :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'", :strict_transport_security => "max-age=631139040; includeSubdomains", :x_content_type_options => "nosniff", :x_download_options => "noopen", :x_frame_options => "sameorigin", :x_permitted_cross_domain_policies => "none", :x_xss_protection => "1; mode=block", :x_powered_by => "Phusion Passenger 4.0.53", :set_cookie => [ [0] "request_method=PUT; path=/; secure; HttpOnly; SameSite=Lax", [1] "_session_id=7500a0ed606db21821d289fd06d07acd; path=/; secure; HttpOnly; SameSite=Lax" ], :etag => "W/\"f8271bd34e55c9d28622ddb8659482f0-gzip\"", :status => "200 OK", :vary => "Accept-Encoding", :content_encoding => "gzip", :content_length => "854", :content_type => "application/json; charset=utf-8" } Host updated.