Identifying master slave on cisco stack switches

Hi Team,

I need to identify master slave on cisco stack switches 3850 in ansible to give some conditions. Any help appreciated.

thanks

How do you identity that without ansible?

Hi Dick,

below is the command to identify without ansible , see the role column . there is no inbuilt facts for this

testsw#sh switch detail
Switch/Stack Mac Address : 0000*.000000
H/W Current
Switch# Role Mac Address Priority Version State

Then you'd have to create your own logic to determine this, based on
that captured output.