antmelekhin.microsoft_repository

微软软件源

这是一个Ansible角色,用于将微软软件源添加到Linux发行版,并从中安装软件包。

要求

  • 支持的Ansible版本:2.9及以上。
  • 支持的平台:
    • Debian
      • 10
      • 11
    • RHEL
      • 7
      • 8
      • 9
    • Ubuntu
      • 18.04
      • 20.04
      • 22.04

角色变量

  • microsoft_repository_mirror_url 微软软件源镜像(默认值:https://packages.microsoft.com)。
  • microsoft_repository_gpgkey_url 微软软件源GPG密钥文件的URL(默认值:https://packages.microsoft.com/keys/microsoft.asc)。
  • microsoft_repository_dirs_list 软件源目录的列表。请参见软件源结构。可用的值有:
    • name prod(默认)
    • type 默认省略(请参见“azure-cli”安装的示例)。
  • microsoft_repository_packages 您想要安装的软件包列表(默认值:[])。

依赖

无。

示例剧本

添加Microsoft Prod软件源:

---
- name: '设置微软软件源'
  hosts: all

  roles:
    - role: antmelekhin.microsoft_repository

添加Microsoft Prod软件源并安装dotnet-sdk-3.1powershell软件包:

---
- name: '设置微软软件源'
  hosts: all

  roles:
    - role: antmelekhin.microsoft_repository
      microsoft_repository_packages:
        - dotnet-sdk-3.1
        - powershell

添加Microsoft Azure CLI软件源并安装azure-cli软件包:

---
- name: '设置微软软件源'
  hosts: all

  roles:
    - role: antmelekhin.microsoft_repository
      microsoft_repository_dirs_list:
        - name: azure-cli
          type: alternative
      microsoft_repository_packages:
        - azure-cli

许可证

MIT

作者信息

梅列基欣·安东。

关于项目

An Ansible role to add Microsoft repository on Linux distros and install packages from it.

安装
ansible-galaxy install antmelekhin.microsoft_repository
许可证
mit
下载
780
拥有者