Remove a node's policy_group/name?

Continuing the discussion from Removing node from Policy/-group:

I have the same question.

  • I have tried knife node policy set <nodename> '' '' and "" "", it always says, ERROR: Policy group and name must be specified together

  • I tried running chef-client on the target with -o <cookbook::recipe> and -r <cookbook::recipe>, both methods denied by an error that setting run_lists are not supported by Policyfile:

    > chef-client -r "cookbook-name::recipe"
    Chef::PolicyBuilder::Policyfile::UnsupportedFeature: Policyfile does not support setting the run_list in 
    json data.
    
    >  chef-client -o "cookbook-name::recipe"
    Chef::PolicyBuilder::Policyfile::UnsupportedFeature: Policyfile does not support override run lists. Use 
    named run_lists instead.
    
  • I tried editing the node and setting the policy_group and policy_name attributes to empty strings; denied with ERROR: Chef::Exceptions::ValidationFailed: Property policy_name's value does not match regular expression /^[\-:.[:alnum:]_]+$/

Is there a trick I'm missing here?

i have a detailed write up of why i'm trying to do this, but i am rethinking my reasoning. Nevertheless, i would like to find out if what i'm trying to do is possible.

Thanks!

one of the ways i follow to remove a policy/group from a node is through knife

knife node edit nodename

and set the values as null for policy name & policy group attributes.