3
我想Ansible輸出格式爲:如何格式化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
bash命令:
ansible all -i inventory.ini -u root -m shell -a "df -h/| tail -1 | awk '{print \$4}'"