The command_line_tools
resource manages the state of a single Xcode Command Line Tools installation, and will only install the latest version for the current running version of macOS.
command_line_tools 'name' do # defaults to '' if not specified
compile_time true, false # defaults to false if not specified
action Symbol # defaults to :install if not specified
end
where:
command_line_tools
is the resource.name
is the name given to the resource block, which is optional.action
identifies which steps the chef-client will take to bring the node into the desired state.compile_time
is the property available to this resource.
The command_line_tools
resource has the following actions:
:install
Default. Install Command Line Tools from Apple. Takes no action if any version has previously been installed on the system, unless that version has been deleted, in which case it will attempt to install that version again.
:upgrade
Check for an updated version of Command Line Tools and install them, unless the latest version is already installed.
:nothing
This resource block does not act unless notified by another resource to take action. Once notified, this resource block either runs immediately or is queued up to run at the end of the Chef Client run.
compile_time
Ruby Type: true, false | Default Value: false
Install the Xcode Command Line Tools at compile time.
command_line_tools
If running macOS 10.14.2, it will install 'Command Line Tools (macOS Mojave version 10.14) for Xcode-10.14' via the softwareupdate
utility.