fix locals not getting updated (#41798)
fix locals not getting updated (#41798)

* fix locals not getting updated

switched to updating the args/assignments as locals doesn't work

* add missing import

thaim/ansible,thaim/ansible