I want to run the life node create of the chef without entering it into the editor.

Asked 2 months ago, Updated 2 months ago, 3 views

I'd like to create a node for chef infra server using the knife command from workstation.

knife node create [node_name]

Then you will be asked to enter node information in the editor.
I'd like to automate this part, but is there a way to create nodes with only cli?

chef

2022-09-30 14:04

1 Answers

As far as the documentation goes, there seems to be a way to create a node by specifying a pre-prepared JSON file.

https://docs.chef.io/workstation/knife_node/ #from-file

Use the from file argument to create a node using existing node data as a template.

Example:Create a node using a JSON file

knife node from file "PATH_TO_JSON_FILE"


2022-09-30 14:04

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.