From 3dac065600a1a37f0d57c465b0addcc5ac7a0dff Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Jan 2023 11:43:00 +0100 Subject: [PATCH] =?UTF-8?q?crontab=20desactiv=C3=A9=20par=20d=C3=A9faut=20?= =?UTF-8?q?pour=20crontab=20=C3=A0=205h=20tout=20les=20jours=20s-backup=20?= =?UTF-8?q?sur=20partage=20smb=20s-win?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../files/{backup.sh => backupsmb.sh} | 0 roles/smb-backup/tasks/main.yml | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) rename roles/smb-backup/files/{backup.sh => backupsmb.sh} (100%) diff --git a/roles/smb-backup/files/backup.sh b/roles/smb-backup/files/backupsmb.sh similarity index 100% rename from roles/smb-backup/files/backup.sh rename to roles/smb-backup/files/backupsmb.sh diff --git a/roles/smb-backup/tasks/main.yml b/roles/smb-backup/tasks/main.yml index 7d7e4be..4e177bd 100644 --- a/roles/smb-backup/tasks/main.yml +++ b/roles/smb-backup/tasks/main.yml @@ -2,7 +2,22 @@ apt: name: - rsync - - smbclient + - smbclient - cifs-utils state: present +- name: copie script backupsmb dans /usr/local/bin + copy: + src: backupsmb.sh + dest: /usr/local/bin + owner: root + group: root + mode: '0755' + +- name: crontab backupsmb ( commentee par defaut ) + cron: + name: backupsmb + disabled: true + minute: "0" + hour: "5" + job: "/usr/local/bin/backupsmb.sh"