ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
814 stars 1.49k forks source link

Add dotnet_tool module #5683

Open Jackenmen opened 1 year ago

Jackenmen commented 1 year ago

Summary

This collection has modules for many package managers but there isn't one for .NET's dotnet tool yet. Considering the popularity of the language, it seems like a reasonable addition to the existing packaging modules.

Issue Type

Feature Idea

Component Name

dotnet_tool

Additional Information

- name: playbook name
  hosts: localhost
  tasks:
    - name: install git-credential-manager
      community.general.dotnet_tool:
        name: git-credential-manager
        global: true
        state: present

    - name: install/upgrade git-credential-manager to latest version
      community.general.dotnet_tool:
        name: git-credential-manager
        global: true
        state: latest

    - name: uninstall git-credential-manager
      community.general.dotnet_tool:
        name: git-credential-manager
        global: true
        state: absent

    - name: install/update/downgrade Microsoft.dotnet-interactive to v1.0.355206
      community.general.dotnet_tool:
        name: Microsoft.dotnet-interactive
        global: true
        version: 1.0.355206
        state: present

    - name: update all
      community.general.dotnet_tool:
        global: true
        state: update_all

I'm unsure how installing/updating/downgrading to a specific version of a package and how updating all tools should be specified in the YAML file.

Code of Conduct

ansibullbot commented 1 year ago

Files identified in the description: None

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

Warkdev commented 1 year ago

@felixfontein shouldn't this reside in the windows community ? https://github.com/ansible-collections/community.windows

Jackenmen commented 1 year ago

.NET is not limited to Windows, I'm actually using dotnet tool on Ubuntu.

Warkdev commented 1 year ago

I wrote too fast, sorry !

felixfontein commented 1 year ago

As long as this tool runs not exclusively under Windows, a module for it is fine in this collection.