/ansible-role-install-nuget

Ansible Role: Install NuGet

Apache License 2.0Apache-2.0

Ansible Role: Install Nuget

License

Install NuGet for Linux and Windows.

Work on

Ansible Galaxy style

  platforms:
    - name: Ubuntu
      versions:
        - focal
        - jammy
    - name: Debian
      version:
        - buster
        - bullseye
        - bookworm
    - name: Windows
      version:
        - 2008x64 (7 64bit)
        - 2019 (10 64bit)

Requirements

min_ansible_version: 2.9

Role Variables

nuget_download_url: https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

nuget_win_path_to_install: '{{ ansible_env.ProgramFiles }}\nuget'

nuget_linux_path_to_install: /usr/local/bin

Dependencies

If you want deploy to Windows 7

Download and install Windows Management Framework 5.1

HowTo

How to install role

Over ansible-galaxy:

TODO.

Over bash+git:

mkdir -p "$HOME/.ansible/roles"
cd "$HOME/.ansible/roles"
git clone https://github.com/don-rumata/ansible-role-install-nuget don_rumata.ansible_role_install_nuget

Quick config WinRM for Windows

https://ru.stackoverflow.com/a/949971/191416

Example Playbooks

I

Install latest NuGet on Windows or Linux:

install-nuget.yml:

- name: Install nuget
  hosts: all
  strategy: free
  serial:
    - "100%"
  roles:
    - don_rumata.ansible_role_install_nuget
  tasks:

II

Install NuGet from intranet:

install-nuget.yml:

- name: Install nuget
  hosts: all
  strategy: free
  serial:
    - "100%"
  roles:
    - role: ansible-role-install-nuget
      nuget_download_url: http://10.10.10.10/soft/nuget/nuget.exe
  tasks:

License

Apache License, Version 2.0

Author Information

don Rumata

TODO

  • Add repo mono project.
  • Install over ansible galaxy.