diff options
| author | luisgulo <luisgulo@gmail.com> | 2025-10-24 18:01:10 +0200 |
|---|---|---|
| committer | luisgulo <luisgulo@gmail.com> | 2025-10-24 18:01:10 +0200 |
| commit | 533e79ba959143f0459431a486bfb85c56c72ddc (patch) | |
| tree | 91974de1bbbdc4c51c76ed591fc5c6e02a3342b6 /examples/cron_root.yaml | |
| parent | 45019c81cfd0fc1d18dce18cdfd5f127c6d61073 (diff) | |
Releasing code version 1.8.0
Diffstat (limited to 'examples/cron_root.yaml')
| -rw-r--r-- | examples/cron_root.yaml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/examples/cron_root.yaml b/examples/cron_root.yaml new file mode 100644 index 0000000..e54f00f --- /dev/null +++ b/examples/cron_root.yaml @@ -0,0 +1,46 @@ +hosts: localhost +parallelism: false + +tasks: + - name: Crear cron ver_df cada hora + module: cron + args: + alias: ver_df + user: root + state: present + schedule: "0 * * * *" + command: "df -h > /tmp/filesize.txt" + + - name: Listar cron de root (tras creación) + module: cron + args: + user: root + state: list + + - name: Modificar cron ver_df a cada 3 horas + module: cron + args: + alias: ver_df + user: root + state: present + schedule: "0 */3 * * *" + command: "df -h > /tmp/filesize.txt" + + - name: Listar cron de root (tras modificación) + module: cron + args: + user: root + state: list + + - name: Eliminar cron ver_df + module: cron + args: + alias: ver_df + user: root + state: absent + + - name: Listar cron de root (tras eliminación) + module: cron + args: + user: root + state: list |
