ansible模块setup/debug
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 自定义的变量 示例: [root@jack7-1 work]# cat debug.yml hosts: PC remote_user: root tasks: name: debug demo debug: msg: "remote host memory :{{ansible_memory_mb}}" 来源: oschina 链接: https://my.oschina.net/u/4328465/blog/4550059