Reputation: 6235
I want to be able to set a variable in a shell-script
- which is part of a multi-part cloud-init userdata configuration setup, and use this variable in a cloud-config
script that comes later in the multi-part userdata.
Is this possible to do? An example would be helpful.
Upvotes: 2
Views: 2705
Reputation: 4959
You could just use a file. Set the "variable" with echo "value" > /tmp/myvar
and get it with echo `cat /tmp/myvar`
.
Upvotes: 2