Skip to content

"Boto3 required for this module" when using delegate_to #511

@knightsg

Description

@knightsg

Got another fun one for you :)

First up, info:

Linux 3.13.0-164-generic #214-Ubuntu SMP Wed Dec 5 10:42:33 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

ansible-playbook 2.6.12.post0 (stable-2.6 114d5c0368) last updated 2019/01/31 22:30:45 (GMT +000)
  config file = /var/jenkins/.ansible.cfg
  configured module search path = [u'/var/jenkins/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible/ansible-2.6/lib/ansible
  executable location = /opt/ansible/ansible-2.6/bin/ansible-playbook
  python version = 2.7.6 (default, Nov 13 2018, 12:45:42) [GCC 4.8.4]

I believe I noticed this while I was helping troubleshoot the issue in #499, so it predates the fixes that were committed for that ticket. However, it's still happening for me since I pulled the latest master commits. We run ansible from a bunch of jenkins agents in various AWS VPCs, and when I run ansible on these hosts with mitogen enabled it fails at the following task, with the error message "Boto3 required for this module":

- name: gather ec2 facts for nagios
  become: False
  ec2_instance_facts:
    region: "{{ nagios_rds_region|default('us-east-1') }}"
    filters:
      instance-state-name: running
  delegate_to: 127.0.0.1
  register: nagios_ec2_instances

When I disable mitogen the task runs without error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions