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 in Ansible by Laila
54 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

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

hosts: localhost
connection: local

answered Feb 9 by Monish

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.