setup 输出gathering facts信息
filter 指定过滤的信息名称,支持正则匹配
fact_path 指定fact后缀文件的路径示例:
ansible jack -m setup -a 'filter="ansible_memory_mb"'ansible jack -m setup -a 'filter="mb"'ansible jack -m setup -a 'fact_path=/data/test.fact'debug 输出调试信息
msg 自定义的信息或者ansible的系统变量
var 自定义的变量示例:
[[email protected] work]# cat debug.yml- hosts: PCremote_user: roottasks:
- name: debug demodebug:msg: "remote host memory :{{ansible_memory_mb}}"
精彩评论