# Cancel operation when performing apt upgrade

**URL:** <https://forum.ansible.com/t/cancel-operation-when-performing-apt-upgrade/19015>\
**Category:** Ansible Project\
**Created:** [August 14, 2015, 9:10am UTC](https://forum.ansible.com/t/cancel-operation-when-performing-apt-upgrade/19015 "2015-08-14T09:10:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntvotran](https://avatars.discourse-cdn.com/v4/letter/n/8e8cbc/32.png) [@ntvotran](https://forum.ansible.com/u/ntvotran)\
**Post date:** [August 14, 2015, 9:10am UTC](https://forum.ansible.com/t/cancel-operation-when-performing-apt-upgrade/19015/1 "2015-08-14T09:10:10Z")

</div>

Hi,

I’m very in IT orchestration and my new mission is to deploy new servers with Ansible.

My questions are :

- How can i handle an apt safe upgrade error ?
- How can script in my playbook “Don’t upgrade if apt encounts error”

What i mean is :  
Many of how servers are old and not upgraded.  
I’m a little chilly because i’ve already been confronted to error when i performed aptitude safe-upgrade in a single server and i don’t want all my servers to be down ☹

Many Thanks

Nhat
