通过 --extra-vars 传递文件和变量 [英] Pass a file and variables through --extra-vars

查看:20
本文介绍了通过 --extra-vars 传递文件和变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到 文件可以提供变量Ansible 通过命令行使用 --extra-vars "@some_file.json",或者变量可以在字符串中设置为 key=value.两者都可以吗?如果是这样,语法是什么?

I see that files can supply variables to Ansible through the command line using --extra-vars "@some_file.json", or variables can be set in strings as key=value. Is it possible to do both? And if so, what's the syntax?

推荐答案

分别指定两者.

--extra-vars "@some_file.json" --extra-vars "key=value" 

这篇关于通过 --extra-vars 传递文件和变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆