LoginSignup
1
0

More than 1 year has passed since last update.

AnsibleでHPE Comware機器を設定する

Posted at

目的:HPE Comwareスイッチを設定するAnsible-playbookを作成する

問題:

  • Ansible及びAnsible-galaxyにはHPE Comware用のモジュールがない
  • Githubにあるhpe-cw7-ansibleモジュールは次の欠点がある
    ① NETCONFを利用するために遅い
    ② VRFを必須とする

対策:

rawモジュールを利用する。
rawモジュールを利用する場合は次の2点に注意する。
①ansible_connectionを指定しない。指定するとエラーになる
②1つのコマンドしか受付ないため、複数のコマンドを実行する場合はvarでコマンドを定義してrawでは定義して変数を指定する。


- name: execute command (comware)
  vars:
    command_string: "system-view\ninfo-center loghost 192.168.10.10"
  raw: "{{ command_string }}"

参考:
(https://stackoverflow.com/questions/30375301/ansible-raw-multiple-commands "ansible raw multiple commands")

以上

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0