How to add organization and location to provisioning template

Hi,

Currently we have a problem that when we choose an organization and
Location some of the provisioning templates are not displayed.

When I choose Any organization, I can see them all…

I can associate the templates to an OS but not an organization or location.

This also gives a blank PXE Linux and provisiong selection choice when
editing the templates tab on an "Operating System" item.

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts

··· ----------------
Tel: 053 20 30 270 	info@netbulae.eu 	Staalsteden 4-3A 	KvK 08198180
Fax: 053 20 30 271 	www.netbulae.eu 	7547 TA Enschede 	BTW NL821234584B01

It's a bit one sided - you can;t do it from the ConfigTemplate edit page,
but you can do it from the Loc/Org edit page. Have a look there and there
should be a tab for templates.

HTH,
Greg

Ah ok. Thanks a lot.

I never checked this as I installed with the default organization and
location I needed.

Now I can assign things far more easy then editing every single item!

But …

I got an error message:

*Oops, we're sorry but something went wrong*


        Warning!

Validation failed: Taxonomy has already been taken

Trace:

/ActiveRecord::RecordInvalid/
*Validation failed: Taxonomy has already been taken*
app/controllers/concerns/foreman/controller/taxonomies_controller.rb:79:in
`block in update'
app/models/taxonomy.rb:52:in `block in no_taxonomy_scope'
app/models/taxonomy.rb:59:in `block (2 levels) in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:148:in `as_location'
app/models/taxonomy.rb:58:in `block in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:113:in `as_org'
app/models/taxonomy.rb:57:in `as_taxonomy'
app/models/taxonomy.rb:51:in `no_taxonomy_scope'
app/controllers/concerns/foreman/controller/taxonomies_controller.rb:78:in
`update'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call' 

From the log:

Processing by OrganizationsController#update as HTML
   Parameters: {"utf8"=>"✓",
"authenticity_token"=>"*****************",
"organization"=>{"name"=>"TESTORG", "description"=>"",
"service_level"=>"", "ignore_types"=>["0", "0", "0", "0", "0", "0",
"0", "0", "0", "0"], "user_ids"=>[""], "smart_proxy_ids"=>["1", ""],
"subnet_ids"=>["1", ""], "compute_resource_ids"=>[""],
"medium_ids"=>["1", "7", "", "2", "3", "4", "5", "6"],
"config_template_ids"=>["44", "54", "", "46", "45", "53", "54", "1",
"37", "39", "47"], "domain_ids"=>["1", ""], "realm_ids"=>["1", ""],
"environment_ids"=>["1", ""], "hostgroup_ids"=>["13", "11", "14",
"", "7", "12", "8", "9", "10", "3"], "location_ids"=>["2", ""]},
"commit"=>"Submit", "id"=>"1-testorg"}
Operation FAILED: Validation failed: Taxonomy has already been taken
   Rendered common/500.html.erb within layouts/application (6.4ms)
   Rendered layouts/base.html.erb (1.4ms)
Completed 500 Internal Server Error in 180ms (Views: 12.0ms |
ActiveRecord: 7.9ms)

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts

··· On 10/28/2014 04:34 PM, Greg Sutcliffe wrote: > It's a bit one sided - you can;t do it from the ConfigTemplate edit > page, but you can do it from the Loc/Org edit page. Have a look there > and there should be a tab for templates. > > HTH, > Greg > -- > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-users+unsubscribe@googlegroups.com > . > To post to this group, send email to foreman-users@googlegroups.com > . > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.
Tel: 053 20 30 270 	info@netbulae.eu 	Staalsteden 4-3A 	KvK 08198180
Fax: 053 20 30 271 	www.netbulae.eu 	7547 TA Enschede 	BTW NL821234584B01

Easy one to fix. I used the "Mismatched Report" button and this lead me
to another button "Fix Mismatches".

Now the error is gone.

Met vriendelijke groet, With kind regards,

Jorick Astrego

Netbulae Virtualization Experts

··· On 10/28/2014 04:42 PM, Jorick Astrego wrote: > > On 10/28/2014 04:34 PM, Greg Sutcliffe wrote: >> It's a bit one sided - you can;t do it from the ConfigTemplate edit >> page, but you can do it from the Loc/Org edit page. Have a look there >> and there should be a tab for templates. >> >> HTH, >> Greg >> -- >> You received this message because you are subscribed to the Google >> Groups "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, >> send an email to foreman-users+unsubscribe@googlegroups.com >> . >> To post to this group, send email to foreman-users@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. > > > Ah ok. Thanks a lot. > > I never checked this as I installed with the default organization and > location I needed. > > Now I can assign things far more easy then editing every single item! > > But .... > > I got an error message: > > *Oops, we're sorry but something went wrong* > > > Warning! > > Validation failed: Taxonomy has already been taken > > ----------------
Tel: 053 20 30 270 	info@netbulae.eu 	Staalsteden 4-3A 	KvK 08198180
Fax: 053 20 30 271 	www.netbulae.eu 	7547 TA Enschede 	BTW NL821234584B01