module is missing interpreter line

734 views
Skip to first unread message

Guy Knights

unread,
Feb 15, 2015, 2:01:32 PM2/15/15
to ansible...@googlegroups.com
I'm hitting an error when I run a playbook that's spitting out the error "module is missing interpreter line". It's dying on a task that uses the file module to copy a file to the remote server. I never had any trouble with this task until I tried to run the latest Ansible code in an attempt to fix an issue with a completely different task in the same playbook. 

On this system I'm using the latest release branch (1.8.2) from the ubuntu PPA, but to try and fix my other failing task I copied my ansible.cfg file and adjusted the settings as necessary so I could use a cloned copy of the ansible devel branch to run the playbook instead. I started seeing this new error once I used the devel branch, so I tried to go back and re-run my playbook using the 1.8.2 version already installed on my system (using the original config file), but the error continued. The task in question (which hasn't changed at all since I did all this, neither has anything else in the playbook) is below:

- name: install private docker registry CA cert
  sudo: yes
  copy:
    src=../files/docker_registry.pem
    dest=/usr/local/share/ca-certificates/docker_registry.pem
    owner=root
    group=root
    mode=0600

I thought perhaps it might be a cached setting or module on the remote system that was causing the error, so I removed the entire .ansible directory from the remote user's home directory, but it didn't fix the error.

Does anyone know how I can fix this?

Thanks,
Guy

Giovanni Tirloni

unread,
Feb 15, 2015, 8:08:26 PM2/15/15
to ansible...@googlegroups.com
On Sun, 15 Feb 2015 11:01 -0800, Guy Knights <guy.k...@gmail.com>
wrote:
> I'm hitting an error when I run a playbook that's spitting out the error
> "module is missing interpreter line". It's dying on a task that uses the
> file module to copy a file to the remote server. I never had any trouble
> with this task until I tried to run the latest Ansible code in an attempt
> to fix an issue with a completely different task in the same playbook.

Hi Guy,

Do you get just that error line or is there a full stack trace? Please
send the output of `ansible --version` too.

Giovanni

Brian Coca

unread,
Feb 16, 2015, 8:46:35 AM2/16/15
to ansible...@googlegroups.com
make sure you removed the previous version, module loading changed and
some old file might be interfering with loading the correct module.




--
Brian Coca

Guy Knights

unread,
Feb 17, 2015, 2:41:41 PM2/17/15
to ansible...@googlegroups.com
Hi Giovanni,

No, there's no stack trace. Just that error line. 

Unfortunately I'm not at home right now but when I get the chance I'll post it here.

Thanks,
Guy

Guy Knights

unread,
Feb 17, 2015, 2:41:59 PM2/17/15
to ansible...@googlegroups.com
Thanks Brian, I'll give that a go when I get the time.
Reply all
Reply to author
Forward
0 new messages