Hello everyone.
Is it possible to access the variables applied to a specific machine from another machine? For example, let’s say we have 1 environment with three machines - M (role master), W1 and W2 (role web). I want to be able to access certain variables that have been applied to W1 and W2 from M. A solution that works now is to set variables that apply to machine M, but this way I have to copy variables that already exist for W1 and W2.
I thought I could do the following:
- From W1 and W2 I create a PowerShell script to set a custom output variable
- On M I use Octopus.Environment.MachinesInRole[web] to get all machines in this role. And then Octopus.Action[MyAction].Output[Machine].MyVariable. However, MachinesInRole returns a list of IDs, not names.
Alternatively, is it possible when I am using Set-OctopusVariable, every machine (W1 and W2) to populate an array with some values and then M to read the values from that array?
Looking forward to hearing your comment