--- - name: Test run für Macosx remote_user: admin hosts: MStudio1 gather_facts: true tasks: - name: Ping ansible.builtin.ping: - name: Prüfe ob Homebrew installiert ist. ansible.builtin.stat: path: /usr/local/bin/brew register: homebrew_check - name: Install Homebrew ansible.builtin.shell: cmd: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" environment: NONINTERACTIVE: "1" when: not homebrew_check.stat.exists - name: zprofile Datei erstellen ansible.builtin.file: path: /Users/admin/.zprofile state: touch mode: u+rwx,g+r - name: Einträge in zprofile hinzufügen ansible.builtin.lineinfile: path: /Users/admin/.zprofile line: 'eval \"$(/usr/local/bin/brew shellenv zsh)\"' create: true - name: Install package mit Brew tags: Install community.general.homebrew: name: - git - wget - btop state: present