Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 12 compatibility #69

Open
That-Dude opened this issue Nov 15, 2021 · 1 comment
Open

macOS 12 compatibility #69

That-Dude opened this issue Nov 15, 2021 · 1 comment

Comments

@That-Dude
Copy link

That-Dude commented Nov 15, 2021

I'm a Github/Ansible newb so apologies if I'm doing something wrong here.

When I run your CLT install playbook agains macOS 12 it forces a user dialogue to appear on the screen and the playbook fails until the user actions it.

I altered a bash script I found elsewhere to work with macOS 12 but I have no idea how to amend your code to use it. Here's the code I altered that works fine over SSH.

#!/bin/bash
# Only run if the tools are not installed yet
xcode-select -p &> /dev/null
if [ $? -ne 0 ]; then
  touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
  PROD=$(softwareupdate -l |
    grep "\*.*Command Line" |
    tail -n 1 | sed 's/^[^C]* //')
  softwareupdate -i "$PROD" --verbose;
else
  echo "Xcode CLI tools already installed"
fi
@elliotweiser
Copy link
Owner

Hi @That-Dude . Try forking this repository and opening a pull-request with these changes applied to the tasks:

https://github.com/elliotweiser/ansible-osx-command-line-tools/blob/master/tasks/main.yml

You'll notice that in this file, the role is doing many of the same things as you described (split across several tasks), but there may need to be some modification to address compatibility with newer MacOS versions. Feel free to submit your change and I'll review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants