There's no yumrepo extra module in the 2.0.0.2

Anybody knows why that? The module exists in the repo since November 2015…

Yes, well known as it is part of the future 2.1. It was merged into
devel after the 2.0 initial release went out.

Hi, look into docs, will be in ansible 2.1.0.

David

Dne 8. 2. 2016 17:08 napsal uživatel <alexk4work@gmail.com>:

Yeah, now I see that in the docs. Thanks for pointing out.

The error is confusing though, hard to determine that the module just doesn’t exist:

ERROR! no action detected in task
The error appears to have been in ‘…roles/epel/tasks/main.yml’: line 7, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:

  • name: Set repo proxy
    ^ here

for the task

`

  • name: Set repo proxy
    yumrepo: name=epel enabled=true proxy=https://{{proxy}}
    `

It is very hard to distinguish that it is a missing module as all the following look like the same error:

  • No action was added to a task entry ( - name: and no module )
  • The task is misspelled ( - phile: )
  • The task is referencing a module that is not available: ( - idontexit: or=icannotfind/read )
  • The task is missing the action name ( - local_action: path=/var/tmp/test.txt )

It is even more ‘fun’ when the task action is dynamic:

  • action:
    module: “{{varwithmodulename}}”

We welcome pull requests to make the message and or detection better, but I doubt that we can distinguish well between the cases above.