# nice/ionice a module on target server

**URL:** <https://forum.ansible.com/t/nice-ionice-a-module-on-target-server/33577>\
**Category:** Ansible Project\
**Created:** [August 10, 2020, 5:51pm UTC](https://forum.ansible.com/t/nice-ionice-a-module-on-target-server/33577 "2020-08-10T17:51:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WK1](https://avatars.discourse-cdn.com/v4/letter/w/c2a13f/32.png) [@WK1](https://forum.ansible.com/u/WK1)\
**Post date:** [August 10, 2020, 5:51pm UTC](https://forum.ansible.com/t/nice-ionice-a-module-on-target-server/33577/1 "2020-08-10T17:51:26Z")

</div>

I have tried googling but have failed.

We use ansible to upgrade a fleet of VMs. Some of them are fairly small and apt in particular seems to really bog them down (yum/dnf isn’t that bad)

if we ssh in to the target we can run apt with nice/ionice

i.e.

```auto
sudo ionice -n 7 nice -n 19 apt-get dist-upgrade

which does the job of not completely disrupting the VM functionality.

However, I would prefer to continue to use the apt module within a playbook with Poll: 0 and monitor from within Ansible.

So is there to way to pass on nice/ionice within a module? I suppose I could use shell and a wrapper but I'd like to do it in the "ansible" way if possible.

Sincerely,

-wk

```
