Skip to content

A script for accessing the Chef Infra Server API using Bash and not using Knife or Ruby.

License

Notifications You must be signed in to change notification settings

chef-davin/chef_curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

dbf4cfc · Oct 24, 2021

History

2 Commits
Oct 24, 2021
Oct 24, 2021
Oct 24, 2021

Repository files navigation

chef_curl

A script for accessing the Chef Infra Server API using Bash and not using Knife or Ruby.

Dependencies

  • curl
  • openssl
  • awk
  • jq

Usage

chef_curl.sh [options] API_PATH

Options:

  • -h: Display this help message
  • -s: Chef Server URL
  • -u: Chef user name
  • -p: Chef User PEM file path
  • -c: CACert Path (defaults to /etc/chef/embedded/ssl/certs/cacert.pem)
  • -v: Chef client version declaration (defaults to 17.6.18)
  • -X: REST Method to use (i.e. GET, PUT, POST). Defaults to GET
  • -d: REST message body (used with POST and PUT methods)

Making things easier

After cloning the script, edit the variables on lines 5 through 11 to set your chef server and user defaults. With this, you won't need to use as many of the command line options except for -X and -d

About

A script for accessing the Chef Infra Server API using Bash and not using Knife or Ruby.

Resources

License

Stars

Watchers

Forks

Languages