diff options
Diffstat (limited to 'roles/openshift_storage_nfs')
-rw-r--r-- | roles/openshift_storage_nfs/README.md | 6 | ||||
-rw-r--r-- | roles/openshift_storage_nfs/handlers/main.yml | 2 | ||||
-rw-r--r-- | roles/openshift_storage_nfs/meta/main.yml | 2 | ||||
-rw-r--r-- | roles/openshift_storage_nfs/tasks/main.yml | 20 |
4 files changed, 14 insertions, 16 deletions
diff --git a/roles/openshift_storage_nfs/README.md b/roles/openshift_storage_nfs/README.md index b0480a958..817b007e8 100644 --- a/roles/openshift_storage_nfs/README.md +++ b/roles/openshift_storage_nfs/README.md @@ -6,10 +6,10 @@ OpenShift NFS Server Installation Requirements ------------ -This role is intended to be applied to the [nfs] host group which is +* Ansible 2.2 +* This role is intended to be applied to the [nfs] host group which is separate from OpenShift infrastructure components. - -Requires access to the 'nfs-utils' package. +* Requires access to the 'nfs-utils' package. Role Variables -------------- diff --git a/roles/openshift_storage_nfs/handlers/main.yml b/roles/openshift_storage_nfs/handlers/main.yml index a1377a203..0d1149db8 100644 --- a/roles/openshift_storage_nfs/handlers/main.yml +++ b/roles/openshift_storage_nfs/handlers/main.yml @@ -1,6 +1,6 @@ --- - name: restart nfs-server - service: + systemd: name: nfs-server state: restarted when: not (nfs_service_status_changed | default(false)) diff --git a/roles/openshift_storage_nfs/meta/main.yml b/roles/openshift_storage_nfs/meta/main.yml index 865865d9c..62e38bd8c 100644 --- a/roles/openshift_storage_nfs/meta/main.yml +++ b/roles/openshift_storage_nfs/meta/main.yml @@ -4,7 +4,7 @@ galaxy_info: description: OpenShift NFS Server company: Red Hat, Inc. license: Apache License, Version 2.0 - min_ansible_version: 1.9 + min_ansible_version: 2.2 platforms: - name: EL versions: diff --git a/roles/openshift_storage_nfs/tasks/main.yml b/roles/openshift_storage_nfs/tasks/main.yml index 4716c77ae..fd935f105 100644 --- a/roles/openshift_storage_nfs/tasks/main.yml +++ b/roles/openshift_storage_nfs/tasks/main.yml @@ -1,6 +1,6 @@ --- - name: Install nfs-utils - action: "{{ ansible_pkg_mgr }} name=nfs-utils state=present" + package: name=nfs-utils state=present - name: Configure NFS lineinfile: @@ -10,7 +10,7 @@ register: nfs_config - name: Restart nfs-config - service: name=nfs-config state=restarted + systemd: name=nfs-config state=restarted when: nfs_config | changed - name: Ensure exports directory exists @@ -26,9 +26,9 @@ owner: nfsnobody group: nfsnobody with_items: - - "{{ openshift.hosted.registry }}" - - "{{ openshift.hosted.metrics }}" - - "{{ openshift.hosted.logging }}" + - "{{ openshift.hosted.registry }}" + - "{{ openshift.hosted.metrics }}" + - "{{ openshift.hosted.logging }}" - name: Configure exports @@ -36,7 +36,7 @@ dest: /etc/exports.d/openshift-ansible.exports src: exports.j2 notify: - - restart nfs-server + - restart nfs-server # Now that we're putting our exports in our own file clean up the old ones - name: register exports @@ -51,16 +51,14 @@ with_items: "{{ exports_out.stdout_lines | default([]) }}" when: exports_out.rc == 0 notify: - - restart nfs-server + - restart nfs-server - name: Enable and start services - service: - name: "{{ item }}" + systemd: + name: nfs-server state: started enabled: yes register: start_result - with_items: - - nfs-server - set_fact: nfs_service_status_changed: "{{ start_result | changed }}" |