freehck.crontask

freehck.crontask

This role is simply a wrapper for the cron module, and it creates cron jobs in the same way.

Role Variables

  • crontask_file: The filename in /etc/cron.d where your jobs will be stored.

  • crontask_name: The name of the job you want to run.

  • crontask_day: The day you want the job to run (default is '*', meaning any day).

  • crontask_hour: The hour you want the job to run (default is '*').

  • crontask_minute: The minute you want the job to run (default is '*').

  • crontask_month: The month you want the job to run (default is '*').

  • crontask_weekday: The weekday you want the job to run (default is '*').

  • crontask_job: The command or script you want to run.

  • crontask_state: The state of the job (default is present, but you can set it to absent to remove it).

  • crontask_user: The user who will run the job (default is root).

  • crontask_commented_out: Set to true to temporarily disable the task.

Example Playbook

- role: freehck.crontask
  crontask_file: "backups"
  crontask_name: "backup database"
  crontask_hour: "12"
  crontask_minute: "0"
  crontask_job: "/opt/scripts/mysql-backup-all.sh"
  crontask_user: "root"
  tags: [ backup, mysql ]

License

MIT

Author Information

Dmitrii Kashin, freehck@freehck.ru

Informazioni sul progetto

role to create cron job, wraps the cron module

Installa
ansible-galaxy install freehck.crontask
Licenza
mit
Download
2.2k
Proprietario