Skip to content

Commit

Permalink
use system python for ansible install in case brew can't install ansible
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhonas committed Jul 26, 2024
1 parent b48d456 commit 0262bd7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ if [ "$(uname)" == "Darwin" ]; then
fi

# Download and install homebrew
if [[ ! -x /opt/homebrew/bin/brew ]]; then
if ! type brew >/dev/null 2>&1; then
echo "Info | Install | homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
eval $(/opt/homebrew/bin/brew shellenv)
else
Expand All @@ -45,16 +44,18 @@ fi

brew update

# Download and install git
# Install git
if ! type git >/dev/null 2>&1; then
echo "Info | Install | git"
brew install git
fi

# Download and install Ansible
# Install ansible
# Assumes system python is installed
if ! type ansible >/dev/null 2>&1; then
echo "Info | Install | ansible"
brew install ansible
python3 -m pip install pipx
python3 -m pipx install ansible
fi

# Make the code directory
Expand All @@ -72,5 +73,5 @@ fi

if [[ -z "$NO_PROVISION" ]]; then
# Provision the box
ansible-playbook --ask-become-pass --become-method=sudo -i $ANSIBLE_DIRECTORY/inventory $ANSIBLE_DIRECTORY/playbook.yml
python3 -m ansible-playbook -i $ANSIBLE_DIRECTORY/inventory $ANSIBLE_DIRECTORY/playbook.yml
fi
4 changes: 2 additions & 2 deletions roles/osx-apps/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# - bitbar
# - drop-to-gif
# - fantastical
- karabiner-elements
- karabiner-elements # keyboard remapping
- google-drive
# - handbrake
# - insomnia
Expand All @@ -19,7 +19,7 @@
- rectangle # for window management
- signal
- spotify
- switchaudio-osx
- switchaudio-osx # for switching audio devices from the command line
- tor-browser
- uninstallpkg
- vlc
Expand Down

0 comments on commit 0262bd7

Please sign in to comment.