# execute command with other user ,different to remote\_user

**URL:** <https://forum.ansible.com/t/execute-command-with-other-user-different-to-remote-user/31564>\
**Category:** Ansible Project\
**Created:** [October 29, 2019, 8:48pm UTC](https://forum.ansible.com/t/execute-command-with-other-user-different-to-remote-user/31564 "2019-10-29T20:48:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oussama\_Maizi](https://avatars.discourse-cdn.com/v4/letter/o/b5ac83/32.png) [@Oussama\_Maizi](https://forum.ansible.com/u/Oussama_Maizi)\
**Post date:** [October 29, 2019, 8:48pm UTC](https://forum.ansible.com/t/execute-command-with-other-user-different-to-remote-user/31564/1 "2019-10-29T20:48:17Z")

</div>

```auto
Hello family,
I have a small problem on ansible, I hope you can help me.
I develop a playbook for automating the installation of an agent. at the beginning of the playbook I start by creating a user ctmagent + directory + copy of the package + tar of the package on the destination /local / ctmagts,
after i make a command - name: launch the agent installation
      command: sudo /local/ctmagts/setup.sh -silent /local/ctmagts/deploy_agent.xml
. the problem is that it installs the package on / home / ansible and not /local / ctmagts.
how can I reconfigure the path so that it can install the package on the desired path?

```

```auto

```

```auto
Regards)

```
