How can i use a puppet class name while creating a host using Foreman API
*I used this curl command:*
curl -k -u admin:changeme -H "Accept: version=2,application/json" -H
"Content-Type: application/json" -k -u admin:changeme -d '{ "host" : {
"name" : "test123", "hostgroup_id" : "1", "compute_resource_id" : "3",
"compute_profile_name" : "1-Small", "environment_id" : "3", "domain_id" :
"1", "mac" : "52:53:00:1e:85:93", "architecture_id" : "1",
"operatingsystem_id" : "5", "puppetclasses" : "config" } }' -X POST
"$FOREMAN_URL"
I gave "puppetclasses" : "config" and getting this error!
giving an "puppetclass_ids" : "5" works.
*Error:*
{
"error": {"message":"Puppetclass(#69872206691040) expected, got
String(#69872304247800)"}
}
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/8fdd02eb-dcce-45e8-9630-fed432f66a55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.