stackhpc.ansible-role-mellanox-switch

Mellanox スイッチ

この役割は、MLNX-OS を実行している Mellanox スイッチを設定します。これには expect Ansible モジュールを使用します。

この役割は、ローカルマシンのシステムサイトパッケージに python の expect パッケージをインストールします。

要件

スイッチは SSH アクセスを許可するように設定されている必要があります。

役割の変数

mellanox_switch_provider は認証プロバイダー情報で、dellos モジュールの provider 引数に似ています。この引数は以下のフィールドを含む辞書である必要があります:

  • host: スイッチのホスト名または IP アドレス。
  • username: SSH 経由でスイッチにアクセスするためのユーザー名。
  • auth_pass: 認証に使用するパスワード。

mellanox_switch_config はスイッチに適用する設定行のリストで、デフォルトは空のリストです。

mellanox_switch_interface_config はインターフェース設定を含みます。これは、スイッチインターフェース名を設定辞書にマッピングする辞書です。各辞書には以下の項目を含めることができます:

  • description - インターフェースに適用する説明。
  • config - インターフェースごとの設定のリスト。

依存関係

なし

例プレイブック

以下のプレイブックは mellanox-switches グループのホストを設定します。各スイッチのホスト、ユーザー名、パスワード用のホスト変数があると仮定しています。全体の設定として VLAN 42 を適用し、2つのイーサネットインターフェースをアクセモードスイッチポートとして有効にします。

---
- name: Mellanox スイッチの設定を確実にする
  hosts: mellanox-switches
  gather_facts: no
  roles:
    - role: stackhpc.mellanox-switch
      mellanox_switch_provider:
        host: "{{ switch_host }}"
        username: "{{ switch_user }}"
        auth_pass: "{{ switch_auth_pass }}"
      mellanox_switch_config:
        - "vlan 42"
        - "exit"
      mellanox_switch_interface_config:
        ethernet 1/1:
          description: server-1
          config:
            - "no shutdown"
            - "switchport mode access"
        ethernet 1/2:
          description: server-2
          config:
            - "no shutdown"
            - "switchport mode access"

著者情報

プロジェクトについて

Role to configure Mellanox switches runnning MLNX-OS

インストール
ansible-galaxy install stackhpc.ansible-role-mellanox-switch
ライセンス
apache-2.0
ダウンロード
148.5k
所有者
StackHPC develops OpenStack capabilities for research computing use cases. Through extensive experience, we understand HPC and cloud.