...
Code Block | ||
---|---|---|
| ||
$ ansible -m setup localhost |
특정 fact 만 알고 싶을 경우 pipe 로 연결해서 grep 을 실행하면 됩니다.
Code Block | ||
---|---|---|
| ||
$ ansible -m setup localhost | grep distribution
"ansible_distribution": "CentOS",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/redhat-release",
"ansible_distribution_file_variety": "RedHat",
"ansible_distribution_major_version": "8",
"ansible_distribution_release": "Core",
"ansible_distribution_version": "8.0", |