Someone more experienced with this, explain this to me:
[13] pry(#<Foreman::Renderer::Scope::Provisioning>)> ProvisioningTemplate.unscoped.where(name: name)
=> [#<ProvisioningTemplate:0x000055555cf68608
id: 64,
name: "kickstart_networking_setup",
template:
"<%#\nname: kickstart_networking_setup\nmodel: ProvisioningTemplate\nsnippet: true\nmodel: ProvisioningTemplate\nkind: snippet\n-%>\n<%- bonded_interfaces = [] -%>\n<%- bonding_interfaces = [] -%>\n<%- @host.bond_interfaces.each do |bond| -%>\n<%- bonding_interfaces.push(bond.identifier) -%>\n<%= \"# \#{bond.identifier} interface\" %>\n<%= snippet('kickstart_ifcfg_get_identifier_names', :variables => { :identifier => bond.identifier }) %>\n<%- ifcfg = snippet('kickstart_ifcfg_bond_interface', :variables => {\n :interface => bond,\n :subnet => bond.subnet,\n :subnet6 => bond.subnet6,\n :dhcp => bond.subnet.nil? ? false : bond.subnet.dhcp_boot_mode? }) -%>\n<%= save_to_file('/etc/sysconfig/network-scripts/ifcfg-$sanitized_real', ifcfg) %>\n\n<%- @host.interfaces_with_identifier(bond.attached_devices_identifiers).each do |interface| -%>\n<%- next if !interface.managed? -%>\n<%= \"# \#{interface.identifier} interface\" %>\n<%= snippet('kickstart_ifcfg_get_identifier_names', :variables => { :interface => interface }) -%>\n<%- ifcfg = snippet('kickstart_ifcfg_bonded_interface', :variables => {\n :interface => interface,\n :subnet => interface.subnet,\n :subnet6 => interface.subnet6,\n :dhcp => false,\n :bond_identifier => bond.identifier }) %>\n<%= save_to_file('/etc/sysconfig/network-scripts/ifcfg-$sanitized_real', ifcfg) %>\n<%- bonded_interfaces.push(interface.identifier) %>\n<%- end -%>\n<%- end -%>\n\n<%- @host.managed_interfaces.each do |interface| %>\n<%- next if !interface.managed? -%>\n<%- next if bonded_interfaces.include?(interface.identifier) -%>\n\n<%- interface_identifier = @host.bond_interfaces.map { |i| i.identifier }.include?(interface.attached_to) ? interface.identifier : nil %>\n<%= \"# \#{interface.identifier} interface\" %>\n<%= snippet('kickstart_ifcfg_get_identifier_names', :variables => { :interface => interface, :identifier => interface_identifier }) -%>\n<%- ifcfg = snippet('kickstart_ifcfg_generic_interface', :variables => {\n :interface => interface,\n :subnet => interface.subnet,\n :subnet6 => interface.subnet6,\n :bonding_interfaces => bonding_interfaces,\n :dhcp => interface.subnet.nil? ? false : interface.subnet.dhcp_boot_mode?,\n :attached_to_bond => interface_identifier.present? }) %>\n<%= save_to_file('/etc/sysconfig/network-scripts/ifcfg-$sanitized_real', ifcfg) %>\n<%- end %>\n",
snippet: true,
template_kind_id: nil,
created_at: Thu, 01 Jun 2017 12:13:03 CEST +02:00,
updated_at: Fri, 24 Jan 2020 13:05:32 CET +01:00,
locked: true,
default: true,
vendor: "Foreman",
type: "ProvisioningTemplate",
os_family: nil,
job_category: nil,
provider_type: nil,
description_format: nil,
execution_timeout_interval: nil,
description: nil>]
[14] pry(#<Foreman::Renderer::Scope::Provisioning>)> ProvisioningTemplate.unscoped.where(name: name, snippet: true)
=> []
What?