I am trying to copy a file from local to the remote VM using ansible, but 
got below error.

My Playbook:

---
- hosts: linux
  remote_user: root
  tasks:
      - name: remove sudo password for Suse and RedHat OS family
        copy: src=waagent dest=/etc/sudoers.d/waagent owner=root group=root 
mode=0644
        sudo: true
        when: ansible_os_family == 'Suse' or ansible_os_family == 'RedHat'


Error:
TASK: [remove sudo password for Suse and RedHat OS family] 
******************** 
fatal: [linux.cloudapp.net] => module is missing interpreter line

FATAL: all hosts have already failed -- aborting


My waagent file content is:
azureuser ALL = (ALL) NOPASSWD:ALL

When tried googling, it mentioned to add bash interpreter for these type of 
errors. In my case, I can't include the bash interpreter here as it is a 
sudo entry. can you help here

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ab9ed7d3-0c86-43ca-a8c0-c47a1d77e4c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to