I have Ansible 2.8.0 and Python 2.7.5. I tried to run the following
playbook to upgrade the packages on a Debian host which has Python 2.7.3. I
got the ""The following modules failed to execute: setup\n setup: MODULE
FAILURE\nSee stdout/stderr for the exact error\n"}" in the Gathering facts
part. Please advice. Thanks in advance.
name: Update and upgrade apt packages
new-buildserver.yaml:
---
# Plan
# use a staging inventory file or specify individual hosts
# copy repos
# install packages
# copy configs for installed packages
# install cpan modules
# update all the things to appropriate levels
# install mxdk
- hosts: buildservers
remote_user: root
roles:
- buildservers
debian-7.yaml:
---
# 2018-07-02
# Vollmer
# Install required packages (and some perl modules) with_items using
default package manager
- name: install required packages
package:
name: "{{ item }}"
state: present
with_items:
- alien
- apache2
- autofs
- bison
- createrepo
- dos2unix
- flex
# - g++-multilib
- git
- html2text
- krb5-user
# - libc6-dev-i386
# - libevent-dev
- libmng1
# - libxml++2.6-2v5
# - libxml++2.6-dev
# - libxml2-dev
- libxml++2.6-2
# - libxml2-dev:i386
# - lib64stdc++6:i386
- libxml2-utils
- lzma
- make
# - smbfs
- nasm
- ntp
- pbuilder
- python-lxml
- rpm2cpio
- xsltproc
- zip
- libexpat1-dev
- libssl-dev
- zlib1g-dev
- cpanminus
# - update
# The following never worked but were included in the original deployment
scripts, kept here for reference
# - lib64stdc++6:i386
# - libxml2-dev:i386
# - smbfs
# It appears that Debian uses all CPAN provided modules so we do not need
to install any from the package manager
- name: install required perl modules
package:
name: "{{ item }}"
state: present
# type: package
with_items:
- libanydata-perl
- libapache-asp-perl
- libcrypt-rc4-perl
- libdigest-sha-perl
- libhttp-dav-perl
- liblog-log4perl-perl
- libsoap-lite-perl
- libterm-shell-perl
- libxml-dom-perl
- libxml-libxml-perl
- libxml-sax-perl
- libxml-xpath-perl
...
PLAY [buildservers]
******************************************************************************************************************************************************
TASK [Gathering Facts]
***************************************************************************************************************************************************
[WARNING]: Unhandled error in Python interpreter discovery for host
abldeb7ex6405: No JSON object could be decoded
fatal: [abldeb7ex6405]: FAILED! => {"ansible_facts": {}, "changed": false,
"msg": "The following modules failed to execute: setup\n setup: MODULE
FAILURE\nSee stdout/stderr for the exact error\n"}
ok: [deb7ex6404]
ok: [deb7ex6403]
ok: [deb7ex6402]
ok: [deb7ex6401]
Ansible Version:
ansible 2.8.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u
'/home/jamekeit/.ansible/plugins/modules', u
'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5
20150623 (Red Hat 4.8.5-28)]
OS Environment:
"Debian GNU/Linux 7 (wheezy)"
Ansible Controller:
Red Hat Enterprise Linux Server 7.5 (Maipo)"
EXPECTED RESULTS:
Output with the list of upgraded packages.
ACTUAL RESULTS:
PLAY [buildservers]
******************************************************************************************************************************************************
TASK [Gathering Facts]
***************************************************************************************************************************************************
[WARNING]: Unhandled error in Python interpreter discovery for host
abldeb7ex6405: No JSON object could be decoded
fatal: [abldeb7ex6405]: FAILED! => {"ansible_facts": {}, "changed": false,
"msg": "The following modules failed to execute: setup\n setup: MODULE
FAILURE\nSee stdout/stderr for the exact error\n"}
ok: [deb7ex6404]
ok: [deb7ex6403]
ok: [deb7ex6402]
ok: [deb7ex6401]
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5b54106d-8c13-4daa-a791-ae374ce3257c%40googlegroups.com.