@prarthana basgod
Yes, you can copy your own Salt states to the Ambari Server (under /srv/salt) and execute them with the following command.
salt '*' state.apply
Your Salt states can do any arbitrary logic and call shell scripts as well.
Hope this helps!