Ansible:是否有可能“猫文件”,并将其输出到屏幕上,而不是作为debugging?
我写了一个安装和configuration每个用户的Google身份validation器的手册。 我希望playbook的最后一步捕获google_authenticatorconfiguration文件。 使用“debugging”模块,我能够获得数据显示在屏幕上,但只能作为debugging消息: TASK: [debug var=details.stdout_lines] **************************************** ok: [localhost] => { "details.stdout_lines": [ "ZKMFTE2ADYA2OYCH", "\"RATE_LIMIT 3 30", "\" DISALLOW_REUSE", "\" TOTP_AUTH", "12920994", "88224784", "69464205", "38144121", "45634120" ] } 我在网上阅读,我可以做这样的事情: – name: Print to screen google authenticator details command: /bin/cat {{ google_authenticator_secret_file_location }} register: details tags: google_2fa_user – debug: msg="{{ details.stdout_lines }}" 但是当我运行它时出现错误: TASK: [Print to […]