/
/
/
Ansible role that deployss my nas configuration. It mostly handles nfs configurations and exports that are tailored to the hardware and service configuration.
1---
2- name: Create backup directories
3 file:
4 path: "{{ item }}"
5 state: directory
6 mode: '0755'
7 owner: root
8 group: root
9 loop: "{{ nas_backup_paths }}"
10 become: true
11 when: nas_backup_paths | length > 0
12
13
14- name: Backup current NFS exports
15 copy:
16 src: /etc/exports
17 dest: /etc/exports.backup
18 remote_src: true
19 mode: '0644'
20 owner: root
21 group: root
22 become: true
23 ignore_errors: true
24
25- name: Backup mdadm configuration
26 copy:
27 src: "{{ nas_mdadm_config_file }}"
28 dest: "{{ nas_mdadm_config_file }}.backup"
29 remote_src: true
30 mode: '0644'
31 owner: root
32 group: root
33 become: true
34 ignore_errors: true
35 when: nas_raid_enabled | bool
36
37