Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding C# playbook so we can make certified stack #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions C#/playbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
- hosts: 127.0.0.1
become: true
tasks:
- apt: update_cache=yes

- name: Add the Microsoft package signing key to your list of trusted keys and add the package repository
get_url:
url="https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb"
dest="/home/codio/packages-microsoft-prod.deb"

- name: Install packages-microsoft-prod
apt: deb="/home/codio/packages-microsoft-prod.deb"
sudo: true

- name: Run the equivalent of "apt-get update" as a separate step
apt:
update_cache: yes
Comment on lines +5 to +18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use apt from url like:

    - name: Install OmniDB
      apt:
        deb: https://github.com/MaximKraev/OmniDB/releases/download/2.17.0-1/omnidb-server_2.17.0-debian-amd64.deb

also you do not need update_cache separately can be added to the next command


- name: Install apt-transport-https
apt: name=apt-transport-https state=present

- name: Install dotnet-sdk-3.1
apt:
name: dotnet-sdk-3.1
state: present
update_cache: yes

- name: Install aspnetcore-runtime-3.1
apt:
name: aspnetcore-runtime-3.1
state: present
update_cache: yes

- name: Install mono dependencies
apt:
name:
- dirmngr
- gnupg
- ca-certificates
state: present
update_cache: yes
Comment on lines +20 to +42
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge all into one ansible instruction to install all packets


- name: Add mono repo to system
shell: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

- name: Install mono-complete
apt: name=mono-complete state=present
Comment on lines +44 to +51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the repo in the beginning and install mono-complete together with other packages.