Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望能够在shell-script- 中设置一个变量,这是多部分 cloud-init 用户数据配置设置的一部分,并在cloud-config稍后出现在多部分用户数据中的脚本中使用此变量。
shell-script
cloud-config
这可能吗?一个例子会很有帮助。
你可以只使用一个文件。设置“变量”echo "value" > /tmp/myvar并使用echo `cat /tmp/myvar`.
echo "value" > /tmp/myvar
echo `cat /tmp/myvar`