I need to disable the passwd plugin in my chef-client environment to avoid a FATAL error due to the large number of users.
The way I did for the local client is to add the following line to the client.rb file:
ohai[:disabled_plugins] = ["passwd"]
When bootstrapping a managed node, I would like to have the same done through the knife bootstrap command to the managed node. From the knife doc, here is the syntax:
--hint HINT_NAME[=HINT_FILE]
An Ohai hint to be set on the target of the bootstrap. The hint is contained in a file and is formatted as JSON: {"attribute":"value","attribute":"value"...}
. HINT_NAME is the name of the hint and HINT_FILE is the name of the hint file located at
/etc/chef/ohai/hints/HINT_FILE.json
Use multiple --hint options in the command to specify multiple hints.
This is what I did:
On the chef workstation, under /etc/chef/ohai/hints/HINT_FIILE.jason, it has the following content:
{disabled_plugins:["passwd"]}
Here is the knife bootstrap command:
knife bootstrap [managed_node_name] --hint disabled_plugins -sudo -x user -P [password] -N "test_node"
When the command is completed, on the managed_node, a new file is created: /etc/chef/ohai/hints/disabled_plugins.json, with the following content:
{}
This doesn't seem right...
Any idea what I did wrong?