From 0df015e9b5c4aefd4245c94ee98021d2af80ed99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 22 Oct 2022 16:41:45 +0200 Subject: lint: pass ansible-lint + yamllint --- roles/nfsclient/handlers/main.yml | 2 +- roles/nfsclient/tasks/main.yml | 12 ++++++------ roles/nfsclient/tasks/os_alpine.yml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'roles/nfsclient') diff --git a/roles/nfsclient/handlers/main.yml b/roles/nfsclient/handlers/main.yml index e6bc07e..ec156ea 100644 --- a/roles/nfsclient/handlers/main.yml +++ b/roles/nfsclient/handlers/main.yml @@ -1,3 +1,3 @@ - name: reload fstab # noqa: command-instead-of-module ignore-errors - command: mount -a + ansible.builtin.command: mount -a ignore_errors: true diff --git a/roles/nfsclient/tasks/main.yml b/roles/nfsclient/tasks/main.yml index 0c1f75e..205a7fa 100644 --- a/roles/nfsclient/tasks/main.yml +++ b/roles/nfsclient/tasks/main.yml @@ -1,14 +1,14 @@ - name: translate server string to server dict - set_fact: + ansible.builtin.set_fact: nfsclient_server_ip: "{{ hostvars[nfsclient_server].__ip.external }}" when: not nfsclient_server_ip -- name: include distribution specific prerequisites - include_tasks: "os_{{ ansible_distribution | lower }}.yml" +- name: include distribution specific prerequisites # noqa: ignore-errors + ansible.builtin.include_tasks: "os_{{ ansible_distribution | lower }}.yml" ignore_errors: true - name: create directory on client - file: + ansible.builtin.file: path: "{{ nfsclient_dir }}" owner: 0 group: 0 @@ -16,14 +16,14 @@ state: directory - name: cleanup fstab with previous nfs setup - lineinfile: + ansible.builtin.lineinfile: path: "{{ nfsclient_fstab_path }}" regexp: ^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:/.* {{ nfsclient_dir }} nfs state: absent register: result - name: complete fstab with nfs - lineinfile: + ansible.builtin.lineinfile: path: "{{ nfsclient_fstab_path }}" line: "{{ nfsclient_server_ip }}:{{ nfsclient_server_dir }}/{{ inventory_hostname }} {{ nfsclient_dir }} nfs rw,nodev,nosuid 0 0" notify: reload fstab diff --git a/roles/nfsclient/tasks/os_alpine.yml b/roles/nfsclient/tasks/os_alpine.yml index 62d8f70..73aebe8 100644 --- a/roles/nfsclient/tasks/os_alpine.yml +++ b/roles/nfsclient/tasks/os_alpine.yml @@ -1,10 +1,10 @@ - name: install nfs-utils - package: + ansible.builtin.package: name: nfs-utils state: present - name: restart and enable nfsmount - service: + ansible.builtin.service: name: nfsmount state: restarted enabled: true -- cgit v1.2.3