Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yum module with update_cache and either bugfix or security set to yes fails. #56638

Closed
robertdebock opened this issue May 20, 2019 · 3 comments
Closed
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback.

Comments

@robertdebock
Copy link
Contributor

SUMMARY

Using the yum module with bugfix or security set to yes errors: "'YumModule' object has no attribute 'yum_basecmd'"

ISSUE TYPE
  • Bug Report
COMPONENT NAME

yum

ANSIBLE VERSION
$  ansible --version
ansible 2.8.0
  config file = /Users/USERNAME/.ansible.cfg
  configured module search path = [u'/Users/USERNAME/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/USERNAME/my_env/lib/python2.7/site-packages/ansible
  executable location = /Users/USERNAME/my_env/bin/ansible
  python version = 2.7.10 (default, Feb 22 2019, 21:17:52) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)]
CONFIGURATION
$ ansible-config dump --only-changed
# No output is shown.
OS / ENVIRONMENT

Control Node: Mac OS X
Managed Node: CentOS 7

STEPS TO REPRODUCE
---
# tasks file for update
- name: Deploy the OS security updates
  yum:
    security: Yes
    state: latest
    conf_file: "/etc/yum.conf"
    update_cache: Yes

Using this molecule configuration:

---
dependency:
  name: galaxy
  options:
    role-file: requirements.yml
driver:
  name: docker
lint:
  name: yamllint
platforms:
  - name: update-centos-latest
    image: centos:latest
provisioner:
  name: ansible
  playbooks:
    prepare: prepare.yml
  lint:
    name: ansible-lint
scenario:
  name: default
EXPECTED RESULTS

Packages maked as security updates would have been updated.

ACTUAL RESULTS
    The full traceback is:
    Traceback (most recent call last):
      File "/root/.ansible/tmp/ansible-tmp-1558355707.78-81878110194455/AnsiballZ_yum.py", line 114, in <module>
        _ansiballz_main()
      File "/root/.ansible/tmp/ansible-tmp-1558355707.78-81878110194455/AnsiballZ_yum.py", line 106, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/root/.ansible/tmp/ansible-tmp-1558355707.78-81878110194455/AnsiballZ_yum.py", line 49, in invoke_module
        imp.load_module('__main__', mod, module, MOD_DESC)
      File "/tmp/ansible_yum_payload_S3mSGm/__main__.py", line 1608, in <module>
      File "/tmp/ansible_yum_payload_S3mSGm/__main__.py", line 1604, in main
      File "/tmp/ansible_yum_payload_S3mSGm/__main__.py", line 1498, in run
    AttributeError: 'YumModule' object has no attribute 'yum_basecmd'

    fatal: [update-centos-latest]: FAILED! => {

        "ansible_facts": {
            "discovered_interpreter_python": "/usr/bin/python"
        },
        "attempts": 3,
        "changed": false,
        "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1558355707.78-81878110194455/AnsiballZ_yum.py\", line
 114, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1558355707.78-81878110194455/AnsiballZ_yum.py\", line 106, in _ansiballz_
main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1558355707.78-81878110194455/AnsiballZ_yum.py\",
line 49, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/tmp/ansible_yum_payload_S3mSGm/__main__.py\", line 1608, in <m
odule>\n  File \"/tmp/ansible_yum_payload_S3mSGm/__main__.py\", line 1604, in main\n  File \"/tmp/ansible_yum_payload_S3mSGm/__main__.py\", line 1498, in r
un\nAttributeError: 'YumModule' object has no attribute 'yum_basecmd'\n",
        "module_stdout": "",
        "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
        "rc": 1
    }
@ansibot
Copy link
Contributor

ansibot commented May 20, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented May 20, 2019

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback. labels May 20, 2019
@mkrizek
Copy link
Contributor

mkrizek commented May 21, 2019

resolved_by_pr #56613

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label May 21, 2019
@mkrizek mkrizek closed this as completed May 21, 2019
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. module This issue/PR relates to a module. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback.
Projects
None yet
Development

No branches or pull requests

3 participants