# Cisco smartport macros

**URL:** <https://forum.ansible.com/t/cisco-smartport-macros/33466>\
**Category:** Ansible Project\
**Created:** [July 23, 2020, 6:20am UTC](https://forum.ansible.com/t/cisco-smartport-macros/33466 "2020-07-23T06:20:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![berti](https://avatars.discourse-cdn.com/v4/letter/b/3d9bf3/32.png) [@berti](https://forum.ansible.com/u/berti)\
**Post date:** [July 23, 2020, 6:20am UTC](https://forum.ansible.com/t/cisco-smartport-macros/33466/1 "2020-07-23T06:20:25Z")

</div>

Hi,

I’ve tried to configure Cisco smartport macros via ansible mit ios\_config/cli\_config.  
Both failed with an timeout.

It looks like this on the serial console:

`TN_00sw03(config)#macro auto execute TEST1_CISCO_SWITCH { {..} > if [[$LINKUP == YES]] then.else.fi> then then.else.fi> conf t then.else.fi> interface $INTERFACE then.else.fi> description linkupmacro then.else.fi> exit then.else.fi> end then.else.fi> fi {..} > if [[$LINKUP == NO]] then.else.fi> then then.else.fi> conf t then.else.fi> interface $INTERFACE then.else.fi> description linkdownmacro then.else.fi> exit then.else.fi> end then.else.fi> fi {..} >} TN_00sw03(config)#exit`

My Playbook:  
`
