|
16 | 16 | that: _lustre_interface is defined
|
17 | 17 | fail_msg: "No interface was found for lustre_subnet_cidr={{ lustre_subnet_cidr }}"
|
18 | 18 |
|
19 |
| -- name: Write LNet configuration file |
20 |
| - template: |
21 |
| - src: lnet.conf.j2 |
22 |
| - dest: /etc/lnet.conf # exists from package install |
23 |
| - owner: root |
24 |
| - group: root |
25 |
| - mode: u=rw,go=r # from package install |
26 |
| - register: _lnet_conf |
| 19 | +# - name: Write LNet configuration file |
| 20 | +# template: |
| 21 | +# src: lnet.conf.j2 |
| 22 | +# dest: /etc/lnet.conf # exists from package install, expected by lnet service |
| 23 | +# owner: root |
| 24 | +# group: root |
| 25 | +# mode: u=rw,go=r # from package install |
| 26 | +# register: _lnet_conf |
27 | 27 |
|
28 |
| -- name: Import LNet configuration |
29 |
| - command: lnetctl import /etc/lnet.conf |
30 |
| - when: _lnet_conf.changed |
| 28 | +# - name: Ensure lnet service state |
| 29 | +# systemd_service: |
| 30 | +# name: lnet |
| 31 | +# state: "'restarted' if _lnet_conf.changed else 'started'" |
| 32 | +# when: _lnet_conf.changed |
31 | 33 |
|
32 | 34 | - name: Ensure mount points exist
|
33 | 35 | ansible.builtin.file:
|
34 |
| - path: "{{ item.mount_point | default(lustre_mount_point) }}/{{ item.fs_name | default(lustre_fs_name) }}" |
| 36 | + path: "{{ lustre_mount_point }}" |
35 | 37 | state: directory
|
36 |
| - loop: "{{ lustre_mounts }}" |
37 |
| - when: "item.mount_state | default(lustre_mount_state) != 'absent'" |
| 38 | + when: "lustre_mount_state != 'absent'" |
38 | 39 | # TODO: do we need to set owner/group/mode either pre- or post-mount?
|
39 | 40 |
|
40 | 41 | # TODO: is this an ok way of doing it?
|
41 | 42 | - name: Mount lustre filesystem
|
42 | 43 | ansible.posix.mount:
|
43 | 44 | fstype: lustre
|
44 |
| - src: "{{ item.mgs_nid | default(lustre_mgs_nid) }}:/{{ item.lustre_fs_name | default(lustre_fs_name) }}" |
45 |
| - path: "{{ item.mount_point | default(lustre_mount_point) }}/{{ item.fs_name | default(lustre_fs_name) }}" |
| 45 | + src: "{{ lustre_mgs_nid }}:/{{ lustre_fs_name }}" |
| 46 | + path: "{{ lustre_mount_point }}" |
46 | 47 | state: "{{ lustre_mount_state }}"
|
47 | 48 | opts: "defaults,_netdev,noauto,x-systemd.automount,x-systemd.requires=lnet.service"
|
48 | 49 | # opts are systemd defaults from http://wiki.lustre.org/Mounting_a_Lustre_File_System_on_Client_Nodes
|
49 |
| - loop: "{{ lustre_mounts }}" |
0 commit comments