From e84ee710a14ed462172a5efa52b57d86cafd3154 Mon Sep 17 00:00:00 2001 From: pan Date: Thu, 14 May 2026 20:32:48 +0200 Subject: [PATCH] Playbook erstellt. --- osx-playbook.yaml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 osx-playbook.yaml diff --git a/osx-playbook.yaml b/osx-playbook.yaml new file mode 100644 index 0000000..82ba701 --- /dev/null +++ b/osx-playbook.yaml @@ -0,0 +1,42 @@ +--- +- 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 \ No newline at end of file