What is OHAI plugin?
Ohai includes many built-in plugins to detect common configuration details as well as a plugin model for writing custom plugins. ohai is the command-line interface for Ohai, a tool that is used to detect attributes on a node, and then provide these attributes to the chef-client at the start of every chef-client run.
Which resource from Ohai cookbook will help you deploy OHAI plugin?
The ohai_hint resource now ships in Chef Infra Client and any plugins can be installed by placing them in an ohai directory within a cookbook in your runlist.
How many Collect_data block can a OHAI plugin have?
one collect_data block
It’s important to remember that within a plugin you can only define one collect_data block for each operating system— ohai will throw an error if you try to define two blocks with the :windows symbol, for example.
Which of the following are the built in handlers in chef?
At current time of writing, there are two handlers built in to the chef-client: the json_file handler, and the error_report handler.
How do you use Chef client?
There are a few ways this can be done:
- Log in as root and then run the chef-client.
- Use su to become the root user, and then run the chef-client. For example:
- Use the sudo utility. $ sudo chef-client.
- Give a user access to read /etc/chef and also the files accessed by the chef-client.
How do you test a Chef cookbook locally?
Following are the steps for testing.
- Step 1 − Install the cookbook using the following command.
- Step 2 − Run the knife cookbook test commands on the working cookbook.
- Step 3 − Break something in the cookbook and test again.
- Step 4 − Run the knife test command again.
What is the use of chef-client?
A chef-client is an agent that runs locally on every node that is under management by Chef. When a chef-client is run, it will perform all of the steps that are required to bring the node into the expected state, including: Registering and authenticating the node with the Chef server.
What is chef software used for?
Chef can manage a variety of node types, including servers, cloud virtual machines, network devices and containers. It manages Linux, Windows, mainframe and several other systems. The tool is intended to enable developers and IT operations professionals to work together to deploy applications on IT infrastructure.
What is Chef software used for?