{"id":19624194,"url":"https://github.com/don-rumata/ansible-role-install-dotnet","last_synced_at":"2026-02-04T01:07:23.383Z","repository":{"id":177573062,"uuid":"359081149","full_name":"don-rumata/ansible-role-install-dotnet","owner":"don-rumata","description":"Ansible Role: Install .NET","archived":false,"fork":false,"pushed_at":"2024-11-23T17:22:20.000Z","size":131,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T22:31:51.679Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-role","centos","debian","dotnet","fedora","opensuse","ubuntu","windows"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/don_rumata/ansible_role_install_dotnet","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/don-rumata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-18T08:00:29.000Z","updated_at":"2024-11-23T17:22:23.000Z","dependencies_parsed_at":"2025-01-10T09:17:20.435Z","dependency_job_id":null,"html_url":"https://github.com/don-rumata/ansible-role-install-dotnet","commit_stats":null,"previous_names":["don-rumata/ansible-role-install-dotnet"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/don-rumata/ansible-role-install-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/don-rumata","download_url":"https://codeload.github.com/don-rumata/ansible-role-install-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don-rumata%2Fansible-role-install-dotnet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263250594,"owners_count":23437288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-galaxy","ansible-role","centos","debian","dotnet","fedora","opensuse","ubuntu","windows"],"created_at":"2024-11-11T11:37:15.913Z","updated_at":"2026-02-04T01:07:23.338Z","avatar_url":"https://github.com/don-rumata.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Role: Install .NET\n\n[![License][license-image]][license-url] [![Ansible Galaxy][ansible-galaxy-image]][ansible-galaxy-url] ![Ansible Role downloads](https://img.shields.io/ansible/role/d/54365)\n\nInstall [.NET](https://dotnet.microsoft.com/download) for Linux and Windows.\n\n## Work on\n\n### Ansible Galaxy style\n\n```yaml\n  platforms:\n    - name: Fedora\n      versions:\n        - 33\n    - name: Ubuntu\n      versions:\n        - trusty\n        - xenial\n        - bionic\n        - cosmic\n        - disco\n        - eoan\n        - focal\n    - name: Debian\n      version:\n        - jessie\n        - stretch\n        - buster\n    # https://github.com/ansible/galaxy/issues/2072\n    - name: EL\n      versions:\n        - 7\n        - 8\n    - name: opensuse\n      vesrion:\n        - tumbleweed\n        - 15.2\n    - name: Windows\n      version:\n        - 2008x64 (7 64bit)\n        - 2019 (10 64bit)\n```\n\n## Requirements\n\n[min_ansible_version: 2.8]\n\n## Role Variables\n\n```yaml\n#--- Release section ---#\n# https://dotnet.microsoft.com/download/dotnet-core\n\n# https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json\n\ndotnet_support_phase: active\n# dotnet_support_phase: lts\n# dotnet_support_phase: current\n# dotnet_support_phase: preview\n# # dotnet_support_phase: eol\n\ndotnet_default_component: runtime\n# dotnet_default_component: sdk\n# dotnet_default_component: hosting\n# dotnet_default_component: aspnetcore-runtime\n\n# TODO\n# dotnet_default_component: aspnetcore-targeting-pack-5.0\n\n# dotnet_current_releases_json: https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/5.0/releases.json\n# dotnet_current_channel_version: 5.0\n\n# TODO.\n# dotnet_current_release: 5.0.3\n# dotnet_current_runtime: 5.0.3\n# dotnet_current_sdk: 5.0.200\n# dotnet_current_aspnetcore_runtime:\n\n# For install custom version for Linux. sudo apt-get install dotnet-runtime-5.0=5.0.3-1\n# dotnet_current_version: 5.0.3-1\n\n# If you have a copy on your local network\n# dotnet_runtime_or_sdk_win_x64_exe_url: http://10.10.10.10/soft/dotnet/dotnet-{{ dotnet_default_component }}-latest-win-amd64.exe\n\n#--- Method install section ---#\n\ndotnet_method_install: package-manager\n\n# https://en.wikipedia.org/wiki/Snappy_(package_manager)\n# https://snapcraft.io/search?q=dotnetcore\n# dotnet_method_install: snap\n\n#--- Urls section ---#\n# https://docs.microsoft.com/en-us/dotnet/core/install/linux\n\ndotnet_releases_index_json_url: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json\n\n#--- Repo section ---#\n\ndotnet_repo_deb_key: https://packages.microsoft.com/keys/microsoft.asc\n\ndotnet_repo_rpm_key: https://packages.microsoft.com/keys/microsoft.asc\n\n# If you *NOT* use apt-cacher-ng or other caching proxy - select \"https\".\nhttp_or_https: http\n# http_or_https: https\n\n#--- Apt repo section ---#\n\n# https://repolib.readthedocs.io/en/latest/deb822-format.html\n\ndotnet_apt_repo_architectures:\n  - amd64\n  - arm64\n  - armhf\ndotnet_apt_repo_components:\n  - main\ndotnet_apt_repo_types:\n  - deb\n  # - deb-src\ndotnet_apt_repo_uris:\n  - \"{{ http_or_https }}://packages.microsoft.com/{{ ansible_lsb.id | lower }}/{{ ansible_distribution_version }}/prod\"\ndotnet_apt_repo_x_repolib_name: Official Microsoft repository\n\ndotnet_apt_repo_path_to_sources: /etc/apt/sources.list.d/microsoft.sources\n```\n\n## Dependencies\n\n### If you want deploy to Windows 7\n\nDownload and install [Windows Management Framework 5.1](https://www.microsoft.com/en-us/download/details.aspx?id=54616)\n\n## HowTo\n\n### How to install role\n\nOver `ansible-galaxy`:\n\n```bash\nansible-galaxy install don_rumata.ansible_role_install_dotnet\n```\n\nOver `bash+git`:\n\n```bash\nmkdir -p \"$HOME/.ansible/roles\"\ncd \"$HOME/.ansible/roles\"\ngit clone https://github.com/don-rumata/ansible-role-install-dotnet don_rumata.ansible_role_install_dotnet\n```\n\n### Quick config WinRM for Windows\n\n\u003chttps://ru.stackoverflow.com/a/949971/191416\u003e\n\n## Example Playbooks\n\n### I\n\nInstall latest current dotnet on Windows or Linux over package manager of you distro:\n\n`install-dotnet.yml`:\n\n```yaml\n- name: Install dotnet\n  hosts: all\n  strategy: free\n  serial:\n    - \"100%\"\n  roles:\n    - don_rumata.ansible_role_install_dotnet\n  tasks:\n```\n\n### II\n\nInstall version `2.1`:\n\n`install-dotnet.yml`:\n\n```yaml\n- name: Install dotnet\n  hosts: all\n  strategy: free\n  serial:\n    - \"100%\"\n  roles:\n    - role: ansible-role-install-dotnet\n      dotnet_current_channel_version: 2.1\n  tasks:\n```\n\n### III\n\nInstall different versions for different hosts:\n\n`install-dotnet.yml`:\n\n```yaml\n- name: Install dotnet\n  hosts: all\n  strategy: free\n  serial:\n    - \"100%\"\n  roles:\n    - role: ansible-role-install-dotnet\n  tasks:\n```\n\n`dotnet-inventory.ini`:\n\n```ini\n[linux-hosts]\ndebian-test-01.local\nubuntu-test-01.local dotnet_method_install=snap\ncentos-7-test-01.local ansible_python_interpreter=/usr/bin/python2\ncentos-8-test-01.local\nopensuse-leap-test-01.local dotnet_default_component=sdk\nopensuse-tumbleweed-test-01.local\nfedora-33-test-01.local dotnet_support_phase=lts\n\n[windows-hosts]\n10.10.10.20\n10.10.10.21\n10.10.10.22\n10.10.10.23\nwin7-64 dotnet_runtime_or_sdk_win_x64_exe_url=\\\\10.10.10.10\\soft\\dotnet\\dotnet-{{ dotnet_default_component }}-latest-win-amd64.exe dotnet_default_component=hosting\nwin10-64 dotnet_runtime_or_sdk_win_x64_exe_url=http://10.10.10.10/soft/dotnet/dotnet-{{ dotnet_default_component }}-latest-win-amd64.exe dotnet_support_phase=preview dotnet_default_component=sdk\n```\n\n```bash\nansible-playbook -i ./dotnet-inventory.ini ./install-dotnet.yml\n```\n\n## License\n\nApache License, Version 2.0\n\n## Author Information\n\n[don Rumata](https://github.com/don-rumata)\n\n## TODO\n\n- Add tests.\n- Add check sha sums: https://dotnetcli.blob.core.windows.net/dotnet/checksums/6.0.26-sha.txt\n\n[license-image]: https://img.shields.io/github/license/don-rumata/ansible-role-install-dotnet.svg\n[license-url]: https://opensource.org/licenses/Apache-2.0\n\n[ansible-galaxy-image]: https://img.shields.io/badge/ansible_galaxy-don__rumata.ansible__role__install__dotnet-blue.svg\n[ansible-galaxy-url]: https://galaxy.ansible.com/don_rumata/ansible_role_install_dotnet\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdon-rumata%2Fansible-role-install-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdon-rumata%2Fansible-role-install-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdon-rumata%2Fansible-role-install-dotnet/lists"}