Error while creating resource group on Azure using Ansible

0 votes

I am trying to create a resource group in Azure using Ansible. However, I am getting the following error:

ERROR! no action detected in task

The error appears to have been in '/home/alam/azure/rg.yml': line 6, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

    - azure_rm_resourcegroup:
      ^ here

Here is my yml playbook:

- name: Test the inventory script  
  hosts: azure   
  connection: local  
  gather_facts: no  

    - name: "Create a resource group"  
        location: westus  
        name: Testing  
        state: present  
          delete: never  
          testing: testing
Mar 26, 2019 in Ansible by Kiara

2 answers to this question.

0 votes
Hey, @Kiara seems like you're using an older version of Ansible. Upgrade to 2.2 and it should start working. The older versions of Ansible does not support creating a resource group.
answered Mar 26, 2019 by Olly
0 votes
Please check you indentation, remove all spaces at the end of every line and then try.
answered Mar 16, 2020 by Shrikant Yerge

Related Questions In Ansible

+1 vote
3 answers
0 votes
1 answer

Error while installing Ansible on Azure

There are few dependencies that you need ...READ MORE

answered Mar 26, 2019 in Ansible by Derryl
0 votes
1 answer
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
1 answer

Error when executing ansible playbook on Azure

Hey @Ganga, As the error message says, ...READ MORE

answered Jan 28, 2019 in Ansible by Kavya
0 votes
1 answer

Error while installing ansible-galaxy on Mac

Run the following to upgrade setuptools under ...READ MORE

answered Mar 13, 2019 in Ansible by Haider