don_rumata.ansible_role_install_dotnet

Ansibleロール: .NETのインストール

ライセンス Ansible Galaxy Ansibleロールのダウンロード数

LinuxおよびWindows用の.NETをインストールします。

対応プラットフォーム

Ansible Galaxyスタイル

  platforms:
    - name: Fedora
      versions:
        - 33
    - name: Ubuntu
      versions:
        - trusty
        - xenial
        - bionic
        - cosmic
        - disco
        - eoan
        - focal
    - name: Debian
      version:
        - jessie
        - stretch
        - buster
    - name: EL
      versions:
        - 7
        - 8
    - name: opensuse
      vesrion:
        - tumbleweed
        - 15.2
    - name: Windows
      version:
        - 2008x64 (7 64bit)
        - 2019 (10 64bit)

要件

[min_ansible_version: 2.8]

ロール変数

#--- リリースセクション ---#

dotnet_support_phase: active
# dotnet_support_phase: lts
# dotnet_support_phase: current
# dotnet_support_phase: preview
# dotnet_support_phase: eol

dotnet_default_component: runtime
# dotnet_default_component: sdk
# dotnet_default_component: hosting
# dotnet_default_component: aspnetcore-runtime

# TODO
# dotnet_current_release: 5.0.3

依存関係

Windows 7にデプロイする場合

Windows Management Framework 5.1をダウンロードしてインストールしてください。

手順

ロールのインストール方法

ansible-galaxyを使用する際:

ansible-galaxy install don_rumata.ansible_role_install_dotnet

bash+gitを使用する場合:

mkdir -p "$HOME/.ansible/roles"
cd "$HOME/.ansible/roles"
git clone https://github.com/don-rumata/ansible-role-install-dotnet don_rumata.ansible_role_install_dotnet

WindowsのWinRMを迅速に設定する方法

https://ru.stackoverflow.com/a/949971/191416

サンプルプレイブック

I

最新の現在のdotnetをLinuxまたはWindowsにインストールする:

install-dotnet.yml

- name: Install dotnet
  hosts: all
  strategy: free
  serial:
    - "100%"
  roles:
    - don_rumata.ansible_role_install_dotnet
  tasks:

II

バージョン2.1をインストール:

install-dotnet.yml

- name: Install dotnet
  hosts: all
  strategy: free
  serial:
    - "100%"
  roles:
    - role: ansible-role-install-dotnet
      dotnet_current_channel_version: 2.1
  tasks:

III

異なるホストに異なるバージョンをインストール:

install-dotnet.yml

- name: Install dotnet
  hosts: all
  strategy: free
  serial:
    - "100%"
  roles:
    - role: ansible-role-install-dotnet
  tasks:

dotnet-inventory.ini

[linux-hosts]
debian-test-01.local
ubuntu-test-01.local dotnet_method_install=snap
centos-7-test-01.local ansible_python_interpreter=/usr/bin/python2
centos-8-test-01.local
opensuse-leap-test-01.local dotnet_default_component=sdk
opensuse-tumbleweed-test-01.local
fedora-33-test-01.local dotnet_support_phase=lts

[windows-hosts]
10.10.10.20
10.10.10.21
10.10.10.22
10.10.10.23
win7-64 dotnet_runtime_or_sdk_win_x64_exe_url=\\10.10.10.10\soft\dotnet\dotnet-{{ dotnet_default_component }}-latest-win-amd64.exe dotnet_default_component=hosting
win10-64 dotnet_runtime_or_sdk_win_x64_exe_url=http://10.10.10.10/soft/dotnet/dotnet-{{ dotnet_default_component }}-latest-win-amd64.exe dotnet_support_phase=preview dotnet_default_component=sdk
ansible-playbook -i ./dotnet-inventory.ini ./install-dotnet.yml

ライセンス

Apache License, Version 2.0

作者情報

don Rumata

TODO

  • テストを追加する。
インストール
ansible-galaxy install don_rumata.ansible_role_install_dotnet
ライセンス
apache-2.0
ダウンロード
141
所有者
Здесь все бесполезно. Знаний не хватает, а золото теряет цену, потому что опаздывает.