Azure: no action detected in task

31 views
Skip to first unread message

Frank Montyne

unread,
Mar 11, 2017, 7:34:41 PM3/11/17
to Ansible Project
I installed the Azure Python SDK 2.0.0rc5 using pip and ansible 2.0.0.2 using apt on a Ubuntu 16.04 machine. I also created a Azure AD service principle and added the information to ~/.azure/credentials. When I try to run a playbook that uses one of the Azure rm module I always get the same error. 

For example when I run the following playbook :
===============================================
- name: Test playbook
  hosts: localhost
  connection: local
  gather_facts: False
  tasks:
  - name: GetFacts
    azure_rm_virtualnetwork_facts:
      subscription_id: 11111111-1111-111111111-111111111111
      resource_group: ansible-test
===============================================

ansible-playbook test.yml
ERROR! no action detected in task

The error appears to have been in '/data/ansible/playbooks/tests/test.yml': line 6, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  tasks:
  - name: GetFacts
    ^ here

I have no idea why I get this error, all help is greatly appreciated!

Frank Montyne

Kai Stian Olstad

unread,
Mar 12, 2017, 3:39:06 AM3/12/17
to ansible...@googlegroups.com
On 11. mars 2017 00:08, Frank Montyne wrote:
> I installed the Azure Python SDK 2.0.0rc5 using pip and ansible 2.0.0.2
> using apt on a Ubuntu 16.04 machine. I also created a Azure AD service
> principle and added the information to ~/.azure/credentials. When I try to
> run a playbook that uses one of the Azure rm module I always get the same
> error.
>
> For example when I run the following playbook :
> ===============================================
> - name: Test playbook
> hosts: localhost
> connection: local
> gather_facts: False
> tasks:
> - name: GetFacts
> azure_rm_virtualnetwork_facts:
> subscription_id: 11111111-1111-111111111-111111111111
> resource_group: ansible-test
> ===============================================
>
> *ansible-playbook test.yml*
> ERROR! no action detected in task
>
> The error appears to have been in '/data/ansible/playbooks/tests/test.yml':
> line 6, column 5, but may
> be elsewhere in the file depending on the exact syntax problem.
>
> The offending line appears to be:
>
> tasks:
> - name: GetFacts
> ^ here
>
> I have no idea why I get this error, all help is greatly appreciated!

On top of the documentation
https://docs.ansible.com/ansible/azure_rm_virtualnetwork_facts_module.html
it says "New in version 2.1."

But you are using Ansible 2.0.

--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages