---
-
hosts: centos6
vars_prompt:
-
name: key
prompt: "please input one value"
private: yes
vars:
key: vars_key
tasks:
-
name: show hostname
shell: hostname
register: info
-
name: show debug
debug: msg="the hostname is {{ info['stdout'] }},the key is {{key}}"
网友评论