Sha256: 224c462ed2bca20d3ab65f4b255e9a7dac8ced3edda79ff538d692860e509a4c
Contents?: true
Size: 2 KB
Versions: 5
Compression:
Stored size: 2 KB
Contents
<%= form_for @discovery_rule, :url => (@discovery_rule.new_record? ? discovery_rules_path : discovery_rule_path(:id => @discovery_rule.id)) do |f| %> <%= base_errors_for @discovery_rule %> <%= text_f f, :name %> <%= autocomplete_f f, :search, :path => "discovered_hosts", :control_group_id => 'search_group', :size => 'col-md-9' %> <%= select_f f, :hostgroup_id, accessible_hostgroups, :id, :to_label, { :include_blank => false }, { :help_inline => _('Target host group for this rule with all properties set')} %> <%= text_f f, :hostname, :help_inline => popover( _("Template"), "<div>" + _("Specify target hostname template pattern in the same syntax as in Provisioning Templates (ERB).") + "</div>"+ "<div>" + _("Domain will be appended automatically. A hostname based on MAC address will be used when left blank. In addition to @host attribute function rand for random integers is available. Examples:") + "</div>"+ "<pre>"+ "myhost-<%= rand(99999) %>" + "\n\n" + "abc-<%= @host.facts['bios_vendor'] + " + "\n" + " '-' + rand(99999) %>" + "\n\n" + "xyz-<%= @host.hostgroup.name %>" + "\n\n" + "srv-<%= @host.discovery_rule.name %>" + "\n\n" + "server-<%= @host.ip.gsub('.','-') + " + "\n" + " '-' + @host.hostgroup.subnet.name %>" + "\n" + "</pre>"+ "</div>"+ "<div>"+ _("When creating hostname patterns, make sure the resulting host names are unique. Hostnames must not start with numbers. A good approach is to use unique information provided by facter (MAC address, BIOS or serial ID).") + "</div>", :title => _("Hostname for provisioned hosts")).html_safe %> <%= text_f f, :max_count, :label => _('Hosts limit'), :help_inline => _('Maximum hosts provisioned with this rule (0 = unlimited)') %> <%= text_f f, :priority, :help_inline => _('Rule priority (lower integer means higher priority)') %> <%= checkbox_f f, :enabled %> <%= submit_or_cancel f %> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems