Commit 8f0ab48d authored by Simon Cornet's avatar Simon Cornet
Browse files

feat: add force time update to toolbox

parent 704b6f80
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7,6 +7,13 @@
  serial: 1
  tasks:

    # force update time
    - name: "force update time using chrony"
      tags:
        - "chrony"
        - "never"
      ansible.builtin.include_tasks: "tasks/chrony.yaml"

    # install updates
    - name: "install updates"
      tags:
+3 −1
Original line number Diff line number Diff line
@@ -6,11 +6,13 @@ This role contains simple ad-hoc tasks. Therefor this role is called a 'tooblox'

| Operating System | Version |
| --- | ----- |
| Alpine | 3.22 |
| Debian | 13 |

## Tags

| Tag | Function |
| --- | -------- |
| `update` | Install updates |
| `chrony` | Force update time |
| `reboot` | Reboots system |
| `update` | Install updates |

tasks/chrony.yaml

0 → 100644
+8 −0
Original line number Diff line number Diff line
---

# force chrony time sync
- name: "chrony - force time sync"
  ansible.builtin.shell:
    cmd: "command -v chronyc >/dev/null 2>&1 && chronyc makestep"
  changed_when: false
  failed_when: false