diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2013-11-04 04:49:58 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:50:41 +0200 |
commit | 02815e8bb46fffc28464162c26e98985bdfd8810 (patch) | |
tree | 139d11eb702ab744f7d37f248065e6146410f3bd /roles/common/tasks/apt.yml | |
parent | 89fd6c4ac7c1a0c2b8529c644caeaa79159e81fe (diff) |
Flush pending handlers between each include.
In particular, run 'apt-get update' right after configured APT, and
restart daemon right after configured them.
The advantage being that if ansible crashes in some "task", the earlier
would already be restarted if neeeded. (This may not happen in the next
run since the configuration should already be up to date.)
Diffstat (limited to 'roles/common/tasks/apt.yml')
-rw-r--r-- | roles/common/tasks/apt.yml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/roles/common/tasks/apt.yml b/roles/common/tasks/apt.yml index 030709b..d172384 100644 --- a/roles/common/tasks/apt.yml +++ b/roles/common/tasks/apt.yml @@ -22,20 +22,23 @@ with_items: - sources.list - preferences notify: - apt-get update - name: Configure APT (2) copy: src=etc/apt/{{ item }} dest=/etc/apt/{{ item }} owner=root group=root mode=0644 with_items: - listchanges.conf - apt.conf.d/10periodic - apt.conf.d/50unattended-upgrades - name: Start cron service: name=cron state=started tags: - cron + +# We should run 'apt-get update' before proceeding to any other task. +- meta: flush_handlers |