From b2eacfc041b548ec31422e2e902eaa227985c3c3 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Wed, 20 Aug 2025 17:52:07 +0200 Subject: Fix homebrew shell configuration --- roles/homebrew/tasks/main.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/roles/homebrew/tasks/main.yml b/roles/homebrew/tasks/main.yml index 81e9dbe3..66632534 100644 --- a/roles/homebrew/tasks/main.yml +++ b/roles/homebrew/tasks/main.yml @@ -33,8 +33,13 @@ NONINTERACTIVE: "1" - name: "Add homebrew to shell profile" - ansible.builtin.lineinfile: + ansible.builtin.blockinfile: path: "{{ ansible_env.HOME }}/.bashrc" - line: 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' + state: "present" + prepend_newline: true + append_newline: true + marker: "# ==== {mark} ANSIBLE HOMEBREW CONFIG" create: true mode: "0644" + block: | + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -- cgit v1.2.3