我正在尝试使用Ansible配置我的AWS账户,并且据我所知,它需要在一行上(除非Windows命令中有一种方法以编程方式按“ ENTER”键)。
有没有办法做到这一点?
答案 0 :(得分:-1)
使用aws configure
也可以交互设置值,但是使用aws configure set
可以直接设置值。
简介 aws configure set varname value [--profile profile-name]
OPTIONS
varname (string) The name of the config value to set.
value (string) The value to set.
例如。
aws configure --profile myprofile set region us-east-1
aws configure --profile myprofile set aws_access_key_id XXXXXXXXXXX
aws configure --profile myprofile set aws_secret_access_key YYYYYYYY
或者,您也可以使用。
aws configure set profile.myprofile.region us-east-1
aws configure set profile.myprofile.aws_access_key_id XXXXXXXXXXX
aws configure set profile.myprofile.aws_secret_access_key YYYYYYYY