filesystems.yml 1 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- hosts: 'all'
  tasks:
  - include_vars: vars/filesystems.yml

- hosts: 'all'
  tasks:
  - filesystem: 
      fstype: ext4 
      dev: "{{ volume.dev }}"
    when: volume.host == inventory_hostname
    loop: "{{ volumes }}"
    loop_control: 
      loop_var: "volume"
    become: true
  - mount: 
      fstype: ext4 
      src: "{{ volume.dev }}"
      state: mounted
      path: "{{ volume.mnt }}"
    when: volume.host == inventory_hostname
    loop: "{{ volumes }}"
    loop_control: 
      loop_var: "volume"
    become: true


- hosts: 'all'
  tasks:
    - include_role: 
        name: nfs-server
      vars:
Chris Hines's avatar
Mig    
Chris Hines committed
32
        exportList: "{{ export.exportList }}"
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
      when: export.host == inventory_hostname
      loop: "{{ nfsexports }}"
      loop_control:
        loop_var: "export"

- hosts: 'all'
  tasks:
    - include_role: 
        name: nfs-client
      vars:
        nfsMounts: "{{ mount.nfsMounts }}"
      when: mount.group in group_names
      loop: "{{ nfsmounts }}"
      loop_control:
        loop_var: "mount"