antmelekhin.microsoft_repository
Microsoft Repository
An Ansible role that adds the Microsoft repository to Linux distributions and installs packages from it.
Requirements
- Supported version of Ansible: 2.9 and highter.
- Supported platforms:
- Debian
- 10
- 11
- RHEL
- 7
- 8
- 9
- Ubuntu
- 18.04
- 20.04
- 22.04
- Debian
Role Variables
microsoft_repository_mirror_urlMicrosoft repository mirror (default:https://packages.microsoft.com).microsoft_repository_gpgkey_urlURL to Microsoft repository GPG key file (default:https://packages.microsoft.com/keys/microsoft.asc).microsoft_repository_dirs_listA list of repository directories. See repository structure. Available values are:nameprod (default)typeommited by default (see the example with the 'azure-cli' install).
microsoft_repository_packagesA list of packages you want to install (default:[]).
Dependencies
None.
Example Playbook
Add the Microsoft Prod repository:
---
- name: 'Setup Microsoft repository'
hosts: all
roles:
- role: antmelekhin.microsoft_repository
Add the Microsoft Prod repository and install dotnet-sdk-3.1 and powershell packages:
---
- name: 'Setup Microsoft repository'
hosts: all
roles:
- role: antmelekhin.microsoft_repository
microsoft_repository_packages:
- dotnet-sdk-3.1
- powershell
Add the Microsoft Azure CLI repository and install the azure-cli package:
---
- name: 'Setup Microsoft repository'
hosts: all
roles:
- role: antmelekhin.microsoft_repository
microsoft_repository_dirs_list:
- name: azure-cli
type: alternative
microsoft_repository_packages:
- azure-cli
License
MIT
Author Information
Melekhin Anton.
About
An Ansible role to add Microsoft repository on Linux distros and install packages from it.
Install
ansible-galaxy install antmelekhin.microsoft_repositoryLicense
mit
Downloads
847
Owner
