Error saying no module boto3 even though I have it

0 votes

My playbook:

 - name: Provision Stack
   tasks:
     - name: launch ansible cloudformation example
       cloudformation:
         stack_name: "ansible-cloudformation"
         state: "present"
         region: "us-east-1"
         disable_rollback: true
         template: "~/cloudformation-example.json"
         tags:
           Stack: "ansible-cloudformation"

error:

Error: fatal: FAILED! => {"changed": false, "failed": true, "msg": "Traceback (most recent call last):\r\n File \"/home/ec2-user/.ansible/tmp/ansible-cloudformation\", line 2123, in \r\n import os, boto3\r\nImportError: No module named boto3\r\n", "parsed": false}

I did install boto3. python import boto3 does not give any error

Feb 9, 2019 in Ansible by Laila
1,355 views

1 answer to this question.

0 votes

Hey @Liala, try using hosts as localhost and connection as local

hosts: localhost
connection: local

answered Feb 9, 2019 by Monish

Related Questions In Ansible

0 votes
1 answer
0 votes
2 answers

Error saying "ImportError: No module named yaml"

actually this related python pckage in order ...READ MORE

answered Jul 18, 2020 in Ansible by shivanand
16,715 views
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,515 views
+2 votes
1 answer
0 votes
1 answer

Error saying "ImportError: No module named ansible.playbook" when installing ansible on aws

Hey @Niana, I don't think you have ...READ MORE

answered Feb 4, 2019 in Ansible by Anushri

edited Feb 6, 2019 4,159 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