Module: ForemanPuppet::Extensions::Host::PrependedMethods
- Defined in:
- app/models/concerns/foreman_puppet/extensions/host.rb
Instance Method Summary collapse
- #available_template_kinds(provisioning = nil) ⇒ Object
-
#importNode(nodeinfo) ⇒ Object
rubocop:disable Naming/MethodName.
- #provisioning_template(opts = {}) ⇒ Object
Instance Method Details
#available_template_kinds(provisioning = nil) ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'app/models/concerns/foreman_puppet/extensions/host.rb', line 63 def available_template_kinds(provisioning = nil) kinds = template_kinds(provisioning) kinds.map do |kind| ::ProvisioningTemplate.find_template({ kind: kind.name, operatingsystem_id: , hostgroup_id: hostgroup_id, environment_id: puppet&.environment_id }) end.compact end |
#importNode(nodeinfo) ⇒ Object
rubocop:disable Naming/MethodName
74 75 76 77 |
# File 'app/models/concerns/foreman_puppet/extensions/host.rb', line 74 def importNode(nodeinfo) facet = puppet || build_puppet facet.import_puppet_node(nodeinfo) end |
#provisioning_template(opts = {}) ⇒ Object
58 59 60 61 |
# File 'app/models/concerns/foreman_puppet/extensions/host.rb', line 58 def provisioning_template(opts = {}) opts[:environment_id] ||= puppet&.environment_id super(opts) end |