summaryrefslogtreecommitdiff
path: root/examples/cron_root.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cron_root.yaml')
-rw-r--r--examples/cron_root.yaml46
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