我想格式化 Ansible 输出:
my_local | SUCCESS | rc=0 >>
116G
my_local2 | SUCCESS | rc=0 >>
116G
至
my_local >> 116G
my_local2 >> 116G
可能吗?
inventory.ini
:
my_local ansible_connection=local
my_local2 ansible_connection=local
重击命令:
ansible all -i inventory.ini -u root -m shell -a "df -h / | tail -1 | awk '{print \$4}'"