Octopus 2018.6.15
Steps to reproduce:
- Create a step targeting a role that will prevent the step from being run
- On a subsequent step, write the output variable
Octopus.Step[S].Status.Code
Result:

This step should populate the status code variable to something other than skipped, perhaps NoOp. This will allow you to easily write run conditions based on this value.