# running second task from inside playbook

**URL:** <https://forum.ansible.com/t/running-second-task-from-inside-playbook/22701>\
**Category:** Ansible Project\
**Created:** [October 2, 2016, 8:41am UTC](https://forum.ansible.com/t/running-second-task-from-inside-playbook/22701 "2016-10-02T08:41:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janis\_Heller](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@Janis\_Heller](https://forum.ansible.com/u/Janis_Heller)\
**Post date:** [October 2, 2016, 8:41am UTC](https://forum.ansible.com/t/running-second-task-from-inside-playbook/22701/1 "2016-10-02T08:41:29Z")

</div>

I have written a playbook to install some proxy servers on servers.  
Now I would need to add a task inside this playbook, so the server get’s entered into my RADIUS server config too. For this I would need to:

- connect to another server using SSH
- edit a file on this server
- …  
How to “connect” to another server from inside a playbook? I don’t like to write another playbook for this (Looking forward to get this done in one run at all).

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 3, 2016, 2:38am UTC](https://forum.ansible.com/t/running-second-task-from-inside-playbook/22701/2 "2016-10-03T02:38:48Z")

</div>

You can ‘delegate’ actions to other hosts.

[http://docs.ansible.com/ansible/playbooks\_delegation.html](http://docs.ansible.com/ansible/playbooks_delegation.html)

---

<div class="post-metadata">

**Author:** ![John\_Favorite](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@John\_Favorite](https://forum.ansible.com/u/John_Favorite)\
**Post date:** [October 3, 2016, 2:41am UTC](https://forum.ansible.com/t/running-second-task-from-inside-playbook/22701/3 "2016-10-03T02:41:26Z")

</div>

that should just be a task run against the radius server in a different role.
