# SQL migration playbooks questions

**URL:** <https://forum.ansible.com/t/sql-migration-playbooks-questions/5805>\
**Category:** Get Help\
**Tags:** playbook\
**Created:** [May 14, 2024, 2:08pm UTC](https://forum.ansible.com/t/sql-migration-playbooks-questions/5805 "2024-05-14T14:08:34Z")\
**Posts on this page:** 1\
**Showing post:** 35

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [June 17, 2024, 10:40am UTC](https://forum.ansible.com/t/sql-migration-playbooks-questions/5805/35 "2024-06-17T10:40:18Z")

</div>

The “`Create SSH keypair in /tmp`” is one task you do want to run on the controller: “`delegate_to: localhost`” and “`run_once: true`”. Likewise for “`Remove generated key pair from the control node`”.

```yaml
    - name: Remove generated key pair from control node
      ansible.builtin.file:
        path: '{{ item }}'
        state: absent
      loop:
        - /tmp/remcpyuser_key
        - /tmp/remcpyuser_key.pub
      delegate_to: localhost
      run_once: true

```

---

_[View the full topic](https://forum.ansible.com/t/sql-migration-playbooks-questions/5805)._
