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
85 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 by Monish

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+13 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,380 points
152 views
0 votes
1 answer
0 votes
1 answer