Last active
April 7, 2024 13:13
-
-
Save ninjarobot/16484d0d524c5d1e48dedf2e086a932d to your computer and use it in GitHub Desktop.
Ansible playbook to install the .NET Core SDK on an Ubuntu server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
tasks: | |
- name: Download MS product repository | |
get_url: | |
url: https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb | |
dest: /tmp/packages-microsoft-prod.deb | |
- name: Install MS product repository | |
apt: deb=/tmp/packages-microsoft-prod.deb | |
become: true | |
- name: Make sure HTTPS is supported by apt | |
apt: | |
name: apt-transport-https | |
state: present | |
update_cache: no | |
become: true | |
- name: Install .NET Core SDK | |
apt: | |
name: dotnet-sdk-2.2 | |
state: present | |
update_cache: yes | |
become: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alternatively install .NET with install-dotnet script.