feat: move tag logic to playbook file

This commit is contained in:
Simon Cornet 2025-11-01 21:13:35 +01:00
commit 982497467a
4 changed files with 13 additions and 25 deletions

View file

@ -16,7 +16,16 @@
changed_when: false
failed_when: false
# execute the role
- name: "execute role: toolbox"
ansible.builtin.include_role:
name: "toolbox"
# install updates
- name: "install updates"
tags:
- "update"
- "never"
ansible.builtin.include_tasks: "tasks/update.yaml"
# initiate reboot
- name: "initiate reboot"
tags:
- "reboot"
- "never"
ansible.builtin.include_tasks: "tasks/reboot.yaml"

View file

@ -1,15 +0,0 @@
---
# install updates
- name: "install updates"
tags:
- "update"
- "never"
ansible.builtin.include_tasks: "update.yaml"
# initiate reboot
- name: "initiate reboot"
tags:
- "reboot"
- "never"
ansible.builtin.include_tasks: "reboot.yaml"

View file

@ -2,9 +2,6 @@
# reboot the system
- name: "reboot the system"
tags:
- "update"
- "never"
ansible.builtin.reboot:
msg: "Reboot initiated by Ansible"
reboot_timeout: 120

View file

@ -2,9 +2,6 @@
# install updates
- name: "install updates"
tags:
- "update"
- "never"
block:
# install updates - alpine