"Leadership is example." To be successful, a good leader must "walk the talk". Employees take a fraction of the time to know a leader as he/she takes to get to know them. The example you are giving is quote simply you. Whether this is a good or a bad example depends on the leader.
An example is set in verbal and non- verbal ways and all aspects of a leader's words and deeds must be considered in the light of this.
If example is contagious, it is worth ensuring that a good one is set to encourage the qualities sought in others.
Some key questions for good leadership are :
*TASK - do you lead from the front / by example?
*TEAM - do you develop your teams' standards through the power of example?
* INDIVIDUAL - do you view each individual as a leader in their own right?
Bad example, particularly of hypocrisy, is noticed more than good, so care must be taken in all that a leader says and does.
With these key features and cautions you can definitely set an example as a leader.