diff options
Diffstat (limited to 'roles/openshift_storage_nfs_lvm/tasks')
-rw-r--r-- | roles/openshift_storage_nfs_lvm/tasks/main.yml | 2 | ||||
-rw-r--r-- | roles/openshift_storage_nfs_lvm/tasks/nfs.yml | 19 |
2 files changed, 15 insertions, 6 deletions
diff --git a/roles/openshift_storage_nfs_lvm/tasks/main.yml b/roles/openshift_storage_nfs_lvm/tasks/main.yml index ea0cc2a94..49dd657b5 100644 --- a/roles/openshift_storage_nfs_lvm/tasks/main.yml +++ b/roles/openshift_storage_nfs_lvm/tasks/main.yml @@ -2,7 +2,7 @@ # TODO -- this may actually work on atomic hosts - fail: msg: "openshift_storage_nfs_lvm is not compatible with atomic host" - when: openshift.common.is_atomic | true + when: openshift.common.is_atomic | bool - name: Create lvm volumes lvol: vg={{osnl_volume_group}} lv={{ item }} size={{osnl_volume_size}}G diff --git a/roles/openshift_storage_nfs_lvm/tasks/nfs.yml b/roles/openshift_storage_nfs_lvm/tasks/nfs.yml index fc8de1cb5..03f4fcec0 100644 --- a/roles/openshift_storage_nfs_lvm/tasks/nfs.yml +++ b/roles/openshift_storage_nfs_lvm/tasks/nfs.yml @@ -1,17 +1,26 @@ --- - name: Install NFS server - action: "{{ ansible_pkg_mgr }} name=nfs-utils state=present" + package: name=nfs-utils state=present when: not openshift.common.is_containerized | bool - + - name: Start rpcbind - service: name=rpcbind state=started enabled=yes + systemd: + name: rpcbind + state: started + enabled: yes - name: Start nfs - service: name=nfs-server state=started enabled=yes + systemd: + name: nfs-server + state: started + enabled: yes - name: Export the directories lineinfile: dest=/etc/exports regexp="^{{ osnl_mount_dir }}/{{ item }} " line="{{ osnl_mount_dir }}/{{ item }} {{osnl_nfs_export_options}}" - with_sequence: start={{osnl_volume_num_start}} count={{osnl_number_of_volumes}} format={{osnl_volume_prefix}}{{osnl_volume_size}}g%04d + with_sequence: + start: "{{osnl_volume_num_start}}" + count: "{{osnl_number_of_volumes}}" + format: "{{osnl_volume_prefix}}{{osnl_volume_size}}g%04d" notify: restart nfs |