stackhpc.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"
著者情報
- マーク・ゴダード (mark@stackhpc.com)
プロジェクトについて
Role to configure Mellanox switches runnning MLNX-OS
インストール
ansible-galaxy install stackhpc.mellanox-switch
ライセンス
apache-2.0
ダウンロード
42.1k
所有者
StackHPC develops OpenStack capabilities for research computing use cases. Through extensive experience, we understand HPC and cloud.