21. サンプル1: show コマンド結果のファイル保存
¡ 保存されたファイルの確認
21
$ cat show_running-config_ios01.log
Building configuration...
Current configuration : 1736 bytes
!
! Last configuration change at 00:36:42 UTC Sun Jun 28 2020 by ansible
!
version 15.8
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname rt01
!
boot-start-marker
boot-end-marker
!
...(略)...
show running-config 実⾏結果が
ファイルとして保存された
22. サンプル1: show コマンド結果のファイル保存
¡ 応⽤・補⾜
¡ 指定次第で他の show コマンドも取得できる
¡ show running-config であれば、ios_config や
ios_facts モジュールでも取得できる
¡ ファイルを git push して履歴管理などの応⽤も
22
- name: show running-config
ios_command:
commands:
- show running-config
register: result_run