diff --git a/curve-ansible/roles/install_package/tasks/include/install_curve-nbd.yml b/curve-ansible/roles/install_package/tasks/include/install_curve-nbd.yml index b302887f0b..f6f6fd9e23 100644 --- a/curve-ansible/roles/install_package/tasks/include/install_curve-nbd.yml +++ b/curve-ansible/roles/install_package/tasks/include/install_curve-nbd.yml @@ -47,12 +47,17 @@ local_file_path: "{{ local_nbd_package_path }}/bin/" file_mode: 0755 include_tasks: copy_file_to_remote.yml - - name: install curvetab + - name: check curvetab exist + stat: + path: "{{ curvetab_path }}/curvetab" + register: file_status + - name: install curvetab if not exist vars: remote_dir_name: "{{ curvetab_path }}" local_file_path: "{{ local_nbd_package_path }}/etc/" file_mode: 0755 include_tasks: copy_file_to_remote.yml + when: not file_status.stat.exists - name: add nbd auto start at boot block: - name: get distro name