From 09adf9b273a151ab037cd12dc4f8e9fadff30a29 Mon Sep 17 00:00:00 2001 From: Alexander Gabriel Date: Sat, 12 Jun 2021 00:55:55 +0100 Subject: [PATCH] added config files and handlers --- handlers/main.yml | 10 ++++++++++ tasks/main.yml | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 handlers/main.yml diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..190b8bc --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,10 @@ +--- +- name: restart smbd + service: + name: smbd + state: restarted + +- name: restart cron + service: + name: cron + state: restarted \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 168aedc..5df8548 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -30,6 +30,20 @@ New SMB password: "{{ networkvault_vault_password }}" Retype new SMB password: "{{ networkvault_vault_password }}" +- name: generate /etc/samba/smb.conf + template: + src: smb.conf.j2 + dest: /etc/samba/smb.conf + notify: + - restart smbd + +- name: generate /etc/rsnapshot.conf + template: + src: rsnapshot.conf.j2 + dest: /etc/rsnapshot.conf + notify: + - restart cron + - name: reboot at 6 in the morning to activate kernel-updates cron: name: "reboot"