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アドレス
ansible.builtin.setup
ansible.netcommon.telnet
ブラウザで表示出来たら良いのに
AWX
メモ
Ansible でサーバー情報を取得する #Ansible - Qiita
https://chatgpt.com/share/66e87627-39e4-800d-9892-10f4c5220f1c
Ansibleでサーバの構成管理を行う #インフラ - Qiita