# Playbook de Ansible para actualizar Discourses

**URL:** <https://meta.discourse.org/t/ansible-playbook-for-updating-discourses/119268>\
**Category:** Sysadmins\
**Tags:** explanation\
**Created:** [1 Junio, 2019 10:01 UTC](https://meta.discourse.org/t/ansible-playbook-for-updating-discourses/119268 "2019-06-01T10:01:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![marianord](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marianord/32/90502_2.png) [@marianord](https://meta.discourse.org/u/marianord)\
**Post date:** [1 Junio, 2019 17:45 UTC](https://meta.discourse.org/t/ansible-playbook-for-updating-discourses/119268/2 "2019-06-01T17:45:12Z")

</div>

It looks interesting, now, I have a few observations, that I think can help to improve the playbook.

- Why always use `dist-upgrade`? It would be safer just to use `apt upgrade` and leave the `apt dist-upgrade` for manual intervention, to ensure nothing breaks.
- Using `autoremove` and `autoclean` can bring some headaches with over enthusiastic packages removal.
- `cd /var/discourse && git pull ` although nice, not needed. My understanding is that `./launcher rebuild app` already does the `git pull`.

I think the playbook could get a lot more powerful using variables, like choosing which upgrade process will be used. Adding conditionals for `autoremove` and `autoclean`. As well for the rebooting as it’s not always needed.

---

_[View the full topic](https://meta.discourse.org/t/ansible-playbook-for-updating-discourses/119268)._
