Ansibleでサーバー情報を取得する
code:yaml
---
- name: Gather specific server information
hosts: webservers
tasks:
- name: Get network, OS, and hardware related facts
ansible.builtin.setup:
filter:
- ansible_all_ipv4_addresses
- ansible_distribution
- ansible_distribution_version
- ansible_architecture
- ansible_memtotal_mb
- name: Display gathered facts
ansible.builtin.debug:
var: ansible_facts
ホスト名
OS
OS name
OS version
ハードウェア情報
メモリ
ディスク
パッケージ情報
ネットワーク情報
IPアドレス
ブラウザで表示出来たら良いのに
メモ