Why does Ansible show “ERROR! no action detected in task” error?

前端 未结 4 1517
醉酒成梦
醉酒成梦 2020-11-27 14:16

Ansible shows an error:

ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

4条回答
  •  春和景丽
    2020-11-27 14:56

    For me the problem occurred with "systemd" module. Turned out that my ansible --version was 2.0.0.2 and module was first introduced in version 2.2. Updating my ansible to latest version fixed the problem.

    playbook.yaml

    - name: "Enable and start docker service and ensure it's not masked"
      systemd:
        name: docker
        state: started
        enabled: yes
        masked: no
    

    Error

    ERROR! no action detected in task
    etc..   
    etc..
    etc..
    
    - name: "Enable and start docker service and ensure it's not masked"
      ^ here
    

提交回复
热议问题