knife node show <node_name>
# Example:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chef' | |
require 'chef/config' | |
require 'chef/server_api' | |
# Configure the Chef Infra Server API endpoint and credentials | |
Chef::Config.node_name = 'yourusername' | |
Chef::Config.client_key = '/path/to/your/client/key.pem' | |
Chef::Config.chef_server_url = 'https://yourchefserver.com/organizations/yourorg' | |
# Define the name and password of the user to create |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Parse command line arguments | |
while getopts ":u:p:" opt; do | |
case ${opt} in | |
u ) | |
USERNAME=$OPTARG | |
;; | |
p ) | |
PASSWORD=$OPTARG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$workstation_version = "21.11.416" | |
$install_path = "C:\opscode\chef-workstation" | |
if (Test-Path $install_path) { | |
$existing_version = (Get-Command "chef" -ErrorAction SilentlyContinue).FileVersionInfo.ProductVersion | |
if ($existing_version -eq $workstation_version) { | |
Write-Host "Chef Workstation $workstation_version is already installed." | |
return | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name "Chef Client Installation" | |
OutFile "install-chef-client.exe" | |
; Constants | |
!define CHEF_VERSION "16.3.73" | |
!define CHEF_MSI "chef-client-${CHEF_VERSION}.msi" | |
; Variables | |
Var ChefClientInstalled |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version = node['openjdk']['version'] | |
major_version = version.split(".")[0] | |
default['openjdk']['path'] = { | |
'windows' => "C:\\Program Files\\OpenJDK\\jdk-#{major_version}", | |
'rhel' => "/usr/lib/jvm/java-#{major_version}-openjdk-#{major_version}", | |
'fedora' => "/usr/lib/jvm/java-#{major_version}-openjdk-#{major_version}", | |
'amazon' => "/usr/lib/jvm/java-#{major_version}-openjdk-#{major_version}", | |
'debian' => "/usr/lib/jvm/java-#{major_version}-openjdk-amd64" | |
} |
Chef-Client 15.x
Environment: OS: Windows 2016
Chef Infra Client is installed in our environment using an unattended bootstrap script. When passing our custom attributes via a first-boot.json we recieve this error TypeError: wrong argument type Hash (expected String)
. This doesn't not happen on versions 14.x and below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is an example of a knife.rb configuration that uses yml and a | |
# simple env var (CHEF_ENV) to manage multiple hosted Chef environments. | |
# | |
# Example usage: | |
# export CHEF_ENV=evnironment_01 | |
# knife status | |
# | |
# Based on: http://blog.blankpad.net/2010/09/28/multiple-knife-environments---the-return/ | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Answer this questions and make sure they align with your bias. | |
● Is this your session? | |
● Is the chart trending or consolidating (choppy)? Do not trade if is consolidating! | |
● Is there any market structure break on the 15m chart? | |
● What zones are currently being rejected on the 30min/1hr chart? (This can give off obvious signs of direction) | |
● What is the overall trend on the 4hr chart? (Look at your indicators) | |
● From all this gathered information, what formed confluence? | |
● Should you place this trade or stay cash for the day? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# knife cheat | |
## Search Examples | |
knife search "name:ip*" | |
knife search "platform:ubuntu*" | |
knife search "platform:*" -a macaddress | |
knife search "platform:ubuntu*" -a uptime | |
knife search "platform:ubuntu*" -a virtualization.system | |
knife search "platform:ubuntu*" -a network.default_gateway |