feat: add force time update to toolbox
This commit is contained in:
parent
704b6f80e6
commit
8f0ab48d3b
3 changed files with 18 additions and 1 deletions
|
|
@ -7,6 +7,13 @@
|
||||||
serial: 1
|
serial: 1
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
# force update time
|
||||||
|
- name: "force update time using chrony"
|
||||||
|
tags:
|
||||||
|
- "chrony"
|
||||||
|
- "never"
|
||||||
|
ansible.builtin.include_tasks: "tasks/chrony.yaml"
|
||||||
|
|
||||||
# install updates
|
# install updates
|
||||||
- name: "install updates"
|
- name: "install updates"
|
||||||
tags:
|
tags:
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,13 @@ This role contains simple ad-hoc tasks. Therefor this role is called a 'tooblox'
|
||||||
|
|
||||||
| Operating System | Version |
|
| Operating System | Version |
|
||||||
| --- | ----- |
|
| --- | ----- |
|
||||||
|
| Alpine | 3.22 |
|
||||||
| Debian | 13 |
|
| Debian | 13 |
|
||||||
|
|
||||||
## Tags
|
## Tags
|
||||||
|
|
||||||
| Tag | Function |
|
| Tag | Function |
|
||||||
| --- | -------- |
|
| --- | -------- |
|
||||||
| `update` | Install updates |
|
| `chrony` | Force update time |
|
||||||
| `reboot` | Reboots system |
|
| `reboot` | Reboots system |
|
||||||
|
| `update` | Install updates |
|
||||||
|
|
|
||||||
8
tasks/chrony.yaml
Normal file
8
tasks/chrony.yaml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
# 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue