Description
Summary
I am using Ansible to set up a Mac for building Flutter apps for iOS. One of the many tools I need to install is melos, which I would typically install using pub
(Dart's package manager).
pub
supports global installs for executable packages such as melos by running dart pub global activate
on the CLI.
Surprisingly, ansible does not have a proper integration with this, so I have to rely on builtin.cmd
for the moment, which always reports the changed
state.
I think a simple integration of pub global installs could be useful to have, and could probably be rather simple to implement by taking inspiration on the many other package managers already wrapped in ansible components.
Issue Type
Feature Idea
Component Name
pub_global (does not exist yet)
Additional Information
An example could look like the following:
# Runs `dart pub global activate melos ^7.0.0-dev`
- name: Install melos
community.general.pub_global:
name: melos
versionSpec: ^7.0.0-dev
state: activated
# This one should run `dart pub global activate --source git https://github.com/invertase/melos.git --git-path packages/melos --overwrite`
- name: Install from git
community.general.pub_global:
git:
source: https://github.com/invertase/melos.git
path: packages/melos
state: activated
overwrite: true
# Also add support for all other CLI options
Code of Conduct
- I agree to follow the Ansible Code of Conduct