---
# @action Ensures Rust is installed
# Installs Rust via `brew` on macOS sudolessly
- name: 'Ensure {{ app_name }} is installed'
  become: false
  community.general.homebrew:
    name:
      - rust
      - rustup-init
    state: "{{ app_state | default('present') }}"

- name: Run generic Linux tasks
  include_tasks: install-Linux.yml
  loop: '{{ user_configs }}'
  loop_control:
    label: '{{ user.username }}'
    loop_var: user
  when: (user.system is not defined) or ((user.system is defined) and (not user.system))
