# Play is skipped in playbook

**URL:** <https://forum.ansible.com/t/play-is-skipped-in-playbook/37939>\
**Category:** Ansible Project\
**Created:** [April 27, 2023, 4:22pm UTC](https://forum.ansible.com/t/play-is-skipped-in-playbook/37939 "2023-04-27T16:22:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Welby](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@John\_Welby](https://forum.ansible.com/u/John_Welby)\
**Post date:** [April 27, 2023, 4:22pm UTC](https://forum.ansible.com/t/play-is-skipped-in-playbook/37939/1 "2023-04-27T16:22:12Z")

</div>

Team;

I am trying to ‘stop’ and ‘mask’ packagekit because it appears it is causing yum locks and blocking the playbook from executing instance patching. Below is at the top of the playbook:

---

<div class="post-metadata">

**Author:** ![Alex\_Wanderley](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/alex_wanderley/32/3232_2.png) [@Alex\_Wanderley](https://forum.ansible.com/u/Alex_Wanderley)\
**Post date:** [April 27, 2023, 4:33pm UTC](https://forum.ansible.com/t/play-is-skipped-in-playbook/37939/2 "2023-04-27T16:33:59Z")

</div>

Hello,

Whenever possible, use Ansible modules instead of shell/command.

Take a look at Ansible’s “systemd” module. It will help you doing both the stop and masking in a single task.

Alex

---

<div class="post-metadata">

**Author:** ![John\_Welby](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@John\_Welby](https://forum.ansible.com/u/John_Welby)\
**Post date:** [April 27, 2023, 10:11pm UTC](https://forum.ansible.com/t/play-is-skipped-in-playbook/37939/3 "2023-04-27T22:11:36Z")

</div>

Thank you Alex!

Got it working now.

Cheers,

John
