Playbook 运行良好,但调试 msg 模块抛出未定义变量错误。
---
- hosts: labservers
become: yes
tasks:
- name: restart httpd
service:
name: httpd
state: restarted
notify:
- cmds
handlers:
- name: change file details
replace:
path: /etc/httpd/conf/magic
regexp: 'its is nothing'
replace: '100 notes ashes'
register: httpd_data
- name: commands out
debug:
msg: "{{httpd_data}}"
listen: "cmds"