diff options
| author | Egor Tensin <egor@tensin.name> | 2025-11-16 00:01:17 +0100 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2025-11-16 00:01:17 +0100 |
| commit | e912ed873c2ab92fed6bc39e27c350413027f1df (patch) | |
| tree | abc0585fa47723e8f49224a0a928958d64fb958a /roles/apt | |
| parent | use import_tasks where possible (diff) | |
| download | infra-ansible-e912ed873c2ab92fed6bc39e27c350413027f1df.tar.gz infra-ansible-e912ed873c2ab92fed6bc39e27c350413027f1df.zip | |
get rid of the more stupid "handlers"
Diffstat (limited to 'roles/apt')
| -rw-r--r-- | roles/apt/handlers/main.yml | 6 | ||||
| -rw-r--r-- | roles/apt/tasks/main.yml | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/roles/apt/handlers/main.yml b/roles/apt/handlers/main.yml deleted file mode 100644 index 354104a..0000000 --- a/roles/apt/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: Reboot - become: true - ansible.builtin.reboot: - # 3 minutes is plenty. - reboot_timeout: 180 - listen: apt_reboot diff --git a/roles/apt/tasks/main.yml b/roles/apt/tasks/main.yml index 1df67d3..a08130d 100644 --- a/roles/apt/tasks/main.yml +++ b/roles/apt/tasks/main.yml @@ -13,7 +13,14 @@ ansible.builtin.apt: update_cache: true upgrade: dist - notify: apt_reboot + register: apt_result + +- name: Reboot + become: true + ansible.builtin.reboot: + # 3 minutes is plenty. + reboot_timeout: 180 + when: apt_result is changed - name: Get dpkg.log ansible.builtin.shell: | |
