gmoisio.ale_aos
ALE_AOS
Alcatel-Lucent Enterprise OmniSwitchデバイスにアクセスするためのAnsibleロールです。
このロールはもうメンテナンスされていません。代わりにAnsibleコレクションが提供されています。
要件
Ansible >= 2.9.2 および netmiko >= 2.4.2 が必要です。
例示プレイブック
- name: ale_aos_pingモジュールのテスト
hosts: ale
connection: local
roles:
- gmoisio.ale_aos
vars:
ansible_python_interpreter: "python"
tasks:
- name: ale_aos_ping Pythonモジュールのテスト
ale_aos_ping:
host: "{{ inventory_hostname }}"
username: admin
password: switch
register: result
- debug: var=result
表示を良くするために、以下の設定をansible.cfgに追加してください:
[defaults]
stdout_callback = yaml
モジュール
module: ale_aos_ping
short_description: ALE OmniSwitchデバイスのSSH接続を確認します。
description:
- OmniSwitchデバイスに接続を試みます。このモジュールは
check_stringがfind_prompt()によって戻された出力に存在するか確認します。
requirements:
- netmiko >= 2.4.2
options:
host:
description:
- {{ inventory_hostname }}に設定します
required: true
port:
description:
- SSH接続ポート
required: false
default: 22
username:
description:
- ログインユーザー名
required: true
password:
description:
- ログインパスワード
required: true
check_string:
description:
- 戻されたプロンプトに確認する文字列
required: false
default: '>'
例
- ale_aos_ping:
host: "{{ inventory_hostname }}"
username: admin
password: switch
module: ale_aos_command
short_description: ALE OmniSwitchデバイスにコマンドを送信します。
description:
- OmniSwitchデバイスに接続してコマンドを送信します。文字列を検索できます。
requirements:
- netmiko >= 2.4.2
options:
host:
description:
- {{ inventory_hostname }}に設定します
required: true
port:
description:
- SSH接続ポート
required: false
default: 22
username:
description:
- ログインユーザー名
required: true
password:
description:
- ログインパスワード
required: true
command:
description:
- デバイスに送信するコマンド
required: true
search:
description:
- コマンドの出力で文字列を検索し、正しく実行されたかを確認します
required: false
default: ''
timing:
description:
- コマンド送信のタイミングを使用するかどうかの真偽値。特にAOS6の制限を回避するのに役立ちます。
required: false
default: false
例
- ale_aos_command:
host: "{{ inventory_hostname }}"
username: admin
password: switch
command: show running-directory
search: "Running Configuration : SYNCHRONIZED"
module: ale_aos_config
short_description: ALE OmniSwitchデバイスに設定コマンドを送信します。
description:
- OmniSwitchデバイスに接続し、設定コマンドを送信します。
ファイルからまたはコマンドリストから受け取ることができます。
requirements:
- netmiko >= 2.4.2
options:
host:
description:
- {{ inventory_hostname }}に設定します
required: true
port:
description:
- SSH接続ポート
required: false
default: 22
username:
description:
- ログインユーザー名
required: true
password:
description:
- ログインパスワード
required: true
file:
description:
- 設定コマンドが1行に1つずつ書かれたテキストファイルのパス
required: false
default: ''
commands:
description:
- 実行する設定コマンドのリスト
required: false
default: []
save:
description:
- 変更成功後にメモリを保存し同期するかどうかの真偽値
required: false
default: false
backup:
description:
- 変更前に設定をファイルにバックアップするかどうかの真偽値
required: false
default: false
例
- ale_aos_config:
host: "{{ inventory_hostname }}"
username: admin
password: switch
commands:
- vlan 100 enable name test1
- vlan 200 enable name test2
- ale_aos_config:
host: "{{ inventory_hostname }}"
username: admin
password: switch
file: commands.txt
差分を表示するためのヒント: ansible-playbook myplaybook.yml --diff -v
ライセンス
Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)。
著者情報
ギルバート・モイシオ、ネットワーク & メソドロジーシニアコンサルタント。
インストール
ansible-galaxy install gmoisio.ale_aos
ライセンス
Unknown
ダウンロード
1.1k
所有者
Network & Methodology Senior Consultant / Full Stack Network Engineer