# cat check_env.sh
#!/bin/bash # echo "=== 检查CPU ===" ansible all -m shell -a "cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c" echo "=== 检查内存 ===" ansible all -m shell -a "free -h | tail -2 | head -1" echo "=== 检查磁盘 ===" ansible all -m shell -a "lsblk |grep disk |wc -l" echo "=== 检查OS版本 ===" ansible all -a 'lsb_release -d' echo "=== 检查内核版本 ===" ansible all -a 'uname -r' echo "=== 检查docker版本 ===" ansible all -a 'docker -v' echo "=== 检查ceph版本 ===" ansible all -a 'ceph -v' echo "=== 检查时间 ===" ansible all -a date echo "=== 检查python3版本 ===" ansible all -a 'python3 -V' # end
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/5044.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
休息一下~~