# \[WARNING\]: The src option requires state to be 'link' or 'hard'.  This will become an error in Ansible 2.10

**URL:** <https://forum.ansible.com/t/warning-the-src-option-requires-state-to-be-link-or-hard-this-will-become-an-error-in-ansible-2-10/29120>\
**Category:** Ansible Project\
**Created:** [November 27, 2018, 2:19am UTC](https://forum.ansible.com/t/warning-the-src-option-requires-state-to-be-link-or-hard-this-will-become-an-error-in-ansible-2-10/29120 "2018-11-27T02:19:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronnie10](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Ronnie10](https://forum.ansible.com/u/Ronnie10)\
**Post date:** [November 27, 2018, 2:19am UTC](https://forum.ansible.com/t/warning-the-src-option-requires-state-to-be-link-or-hard-this-will-become-an-error-in-ansible-2-10/29120/1 "2018-11-27T02:19:50Z")

</div>

Hi All,

I have the following ansible codes, however when I run molecule test, it gave me the error as my subject, anyway to fix that?

- name: Copy file to config folder  
file:  
src: files/  
dest: “PATH/config/”  
mode: 0644

Thank you.

---

<div class="post-metadata">

**Author:** ![tkuratom](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@tkuratom](https://forum.ansible.com/u/tkuratom)\
**Post date:** [November 27, 2018, 2:22am UTC](https://forum.ansible.com/t/warning-the-src-option-requires-state-to-be-link-or-hard-this-will-become-an-error-in-ansible-2-10/29120/2 "2018-11-27T02:22:43Z")

</div>

From the name of your task, it looks like you mean to use copy:, not file:

-Toshio

---

<div class="post-metadata">

**Author:** ![Ronnie10](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Ronnie10](https://forum.ansible.com/u/Ronnie10)\
**Post date:** [November 27, 2018, 2:27am UTC](https://forum.ansible.com/t/warning-the-src-option-requires-state-to-be-link-or-hard-this-will-become-an-error-in-ansible-2-10/29120/3 "2018-11-27T02:27:19Z")

</div>

Thanks!

It solved the issue!
