From 333792e4e639f447e429cc3b4635a8b8abac41ad Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Fri, 13 May 2022 10:46:25 +0200 Subject: [PATCH] Removed ansible play from mac os x kb --- knowledge base/mac os x.md | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/knowledge base/mac os x.md b/knowledge base/mac os x.md index dae8510..294336a 100644 --- a/knowledge base/mac os x.md +++ b/knowledge base/mac os x.md @@ -79,8 +79,6 @@ The tools will be installed into `/Library/Developer/CommandLineTools`, with the ### Headless installation -In CLI: - ```shell # Force the `softwareupdate` utility to list the Command Line Tools. touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress @@ -97,41 +95,6 @@ CLI_TOOLS_LABEL="$(/usr/sbin/softwareupdate -l \ /usr/sbin/softwareupdate -i --agree-to-license $CLI_TOOLS_LABEL ``` -As Ansible task: - -```yaml -- name: Check Command Line Tools are already installed - command: xcode-select --print-path - ignore_errors: true - register: cli_tools_check -- name: Try headless installing command line tools - when: cli_tools_check is failed - block: - - name: Force `softwareupdate` to list the Command Line Tools - file: - path: /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress - state: touch - - name: Get the tools' label - shell: >- - /usr/sbin/softwareupdate -l - | grep -B 1 -E 'Command Line Tools' - | awk -F'*' '/^ *\\*/ {print $2}' - | sed -e 's/^ *Label: //' -e 's/^ *//' - | sort -V - | tail -n1 - register: cli_tools_label - - name: Install the tools - command: >- - /usr/sbin/softwareupdate -i --agree-to-license '{{cli_tools_label.stdout}}' - register: headless_cli_tools_installation - - name: Print message on failure - when: headless_cli_tools_installation is failed - fail: - msg: >- - Command Line Tools are not installed. Please execute - 'xcode-select --install' in a terminal and accept the license. -``` - ### Removal ```shell