# Blockinfile module not in the right place?

**URL:** <https://forum.ansible.com/t/blockinfile-module-not-in-the-right-place/22595>\
**Category:** Ansible Project\
**Created:** [September 20, 2016, 2:44pm UTC](https://forum.ansible.com/t/blockinfile-module-not-in-the-right-place/22595 "2016-09-20T14:44:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clifford\_Trueman](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Clifford\_Trueman](https://forum.ansible.com/u/Clifford_Trueman)\
**Post date:** [September 20, 2016, 2:44pm UTC](https://forum.ansible.com/t/blockinfile-module-not-in-the-right-place/22595/1 "2016-09-20T14:44:49Z")

</div>

So running into a few issues running blockinfile for a few tests.

I created a really basic playbook literally form the ansible doc example

```auto
- name: insert/update eth0 configuration stanza in /etc/network/interfaces
        (it might be better to copy files into /etc/network/interfaces.d/)
  blockinfile:
    dest: /etc/network/interfaces
    block: |
      iface eth0 inet static
          address 192.0.2.23
          netmask 255.255.255.0

when I run it it throws a syntax error pointing to the blockinfile line

So I'm curious if it's not finding the module or I really have a syntax issue, so the reason I think that is that i had ansible-19.4-1.el6.noarch installed and it had no files for 
blockinfile at all. I upgraded it to 2.1.10-1.el6.noarch and it added /usr/lib/python2.6/site-packages/ansible/modules/extras/files/blockinfile.py I even used the --module-path flag and still no joy.

It says the default module path is /usr/share/my_modules but that directory was never created by the RPM. However, other functions like passwd change works fine. 

So is my install messed up or am I building playbooks incorrectly?

```

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [September 26, 2016, 10:46pm UTC](https://forum.ansible.com/t/blockinfile-module-not-in-the-right-place/22595/2 "2016-09-26T22:46:54Z")

</div>

Look at the output of ansible --version, check the ansible.cfg file in use, it probably is pointing at that directory.
