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

前端 未结 4 1538
醉酒成梦
醉酒成梦 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 15:16

    Explanation of the error :

    No tasks to execute means it can not do the action that was described in your playbook

    Root cause:

    • the installed version of Ansible doesn't support it

    How to check :

    • ansible --version

    Solution:

    • upgrade Ansible to a version which supports the feature you are trying to use

    How to upgrade Ansible:

    https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#selecting-an-ansible-version-to-install

    Quick instruction for Ubuntu :

    sudo apt update
    sudo apt install software-properties-common
    sudo apt-add-repository --yes --update ppa:ansible/ansible
    sudo apt install ansible
    

    P.S: followed this path and upgraded from version 2.0.2 to 2.9 After upgrade, same playbook worked like a charm

提交回复
热议问题