Skip to content

Instantly share code, notes, and snippets.

@arbabnazar
Forked from ninjarobot/dotnet.yaml
Created April 7, 2024 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arbabnazar/19d03b903afc45aae4dcd1dacdfa0c25 to your computer and use it in GitHub Desktop.
Save arbabnazar/19d03b903afc45aae4dcd1dacdfa0c25 to your computer and use it in GitHub Desktop.
Ansible playbook to install the .NET Core SDK on an Ubuntu server.
---
- 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