From 34b41b4a930eda4c81a5c2e578c5838f5afbe0bd Mon Sep 17 00:00:00 2001 From: Florian Piesche <79453505+florianpiesche@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:11:53 +0100 Subject: [PATCH] Don't use `ansible_user` (NO_JIRA) --- tasks/Darwin.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tasks/Darwin.yml b/tasks/Darwin.yml index c27d890..4986b8a 100644 --- a/tasks/Darwin.yml +++ b/tasks/Darwin.yml @@ -1,21 +1,24 @@ --- +- name: Get remote username + ansible.builtin.set_fact: + remote_user: "{{ ansible_user_id }}" + - name: Ensure user can deploy manpages ansible.builtin.file: path: /usr/local/share/man/man8 state: directory recurse: yes - owner: "{{ ansible_user }}" + owner: "{{ remote_user }}" become: true - name: Install Homebrew + tools ansible.builtin.include_role: name: geerlingguy.mac.homebrew - vars: - # This is overwritten by our group_vars (cpp.build-machines) - homebrew_installed_packages: - - svn - # Compression utilities - - xz # efficient compression + +- name: Ensure necessary homebrew packages are installed + community.general.homebrew: + name: + - xz # Download utilities - wget # for downloads, curl is part of the system - jq @@ -33,6 +36,7 @@ when: not cpp_buildmachine - name: Link conan - ansible.builtin.command: brew link conan@1 + ansible.builtin.command: + cmd: brew link conan@1 environment: PATH: "/usr/local/bin:/usr/bin"