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:

  tasks:
    - azure_rm_resourcegroup:
      ^ here

Here is my yml playbook:

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

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

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 27, 2019 by Olly
0 votes
Please check you indentation, remove all spaces at the end of every line and then try.
answered Mar 17, 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
892 views
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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,944 views
+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 29, 2019 in Ansible by Kavya
927 views
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
692 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP