Initialisation depot
This commit is contained in:
38
Migration/Ansible/roles/samba4-dc/tasks/post_install.yml
Normal file
38
Migration/Ansible/roles/samba4-dc/tasks/post_install.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
- name: Create backup script
|
||||
template:
|
||||
src: samba-backup.sh.j2
|
||||
dest: /usr/local/bin/samba-backup.sh
|
||||
mode: '0755'
|
||||
|
||||
- name: Create restore script
|
||||
template:
|
||||
src: samba-restore.sh.j2
|
||||
dest: /usr/local/bin/samba-restore.sh
|
||||
mode: '0755'
|
||||
|
||||
- name: Create ChangeNextRid script
|
||||
template:
|
||||
src: samba-changenextrid.sh.j2
|
||||
dest: /usr/local/bin/samba-changenextrid.sh
|
||||
mode: '0755'
|
||||
|
||||
- name: Setup NFS backup storage
|
||||
include_role:
|
||||
name: nfs
|
||||
vars:
|
||||
nfs_mounts:
|
||||
- server: "192.168.100.210"
|
||||
share: "/mnt/zpool20T/data-encrypt/NFS"
|
||||
path: "/backup"
|
||||
options: "rw,sync,hard,intr,rsize=8192,wsize=8192"
|
||||
subdirs:
|
||||
- "samba"
|
||||
|
||||
- name: Setup backup cron job
|
||||
cron:
|
||||
name: "Samba4 weekly backup"
|
||||
minute: "0"
|
||||
hour: "2"
|
||||
weekday: "0"
|
||||
job: "/usr/local/bin/samba-backup.sh"
|
||||
Reference in New Issue
Block a user