# command executes main ruby script but exits before finish

**URL:** <https://forum.ansible.com/t/command-executes-main-ruby-script-but-exits-before-finish/24209>\
**Category:** Ansible Project\
**Created:** [April 12, 2017, 6:41pm UTC](https://forum.ansible.com/t/command-executes-main-ruby-script-but-exits-before-finish/24209 "2017-04-12T18:41:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob\_Mokkink](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@Rob\_Mokkink](https://forum.ansible.com/u/Rob_Mokkink)\
**Post date:** [April 12, 2017, 6:41pm UTC](https://forum.ansible.com/t/command-executes-main-ruby-script-but-exits-before-finish/24209/1 "2017-04-12T18:41:38Z")

</div>

Hi,

I am trying to the a command task to work with a ruby script(`foreman-proxy-certs-generate), see https://theforeman.org/plugins/katello/3.3/installation/smart_proxy.html.`  
`The script is the main script but executes puppet and other scripts. The main script finishes and the command task is then finished, but i need it to wait before it finishes.`  
`I tried adding the option "creates", because the script creates a tar file with certificates etc.`

`What is the best way to deal with this issue in ansible?`

`Thanks.`

`Regards,`

`Rob`
