From 6def484a4313e3f4ce5aae1c4a7fedf20f9b3b30 Mon Sep 17 00:00:00 2001 From: jishnupn04 Date: Tue, 13 Aug 2024 21:37:31 +0530 Subject: [PATCH] Adding missing dependencies 3.5 --- one_installer.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/one_installer.yml b/one_installer.yml index 95c6727..d294d43 100644 --- a/one_installer.yml +++ b/one_installer.yml @@ -78,12 +78,17 @@ debug: msg: "pyenv installation status: {{ pyenv_status.stdout }}" - name: Install Homebrew + become: no shell: | - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bashrc - eval "$(/opt/homebrew/bin/brew shellenv)" - source ~/.bashrc - become: yes + if ! command -v brew &> /dev/null; then + echo "Homebrew not found. Installing Homebrew." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bash_profile + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + else + echo "Homebrew is already installed." + fi + ignore_errors : yes - name: Install rupa/z, and mcfly become: yes @@ -217,7 +222,7 @@ - golang.Go - ryanluker.vscode-coverage-gutters ignore_errors : yes - + - name: Install GVM (Go Version Manager) become: yes become_user: "{{ current_user.stdout }}"