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

openbsd_pkg: install latest package #34766

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
5 participants
@t6n
Copy link

t6n commented Jan 11, 2018

SUMMARY

Install the latest version of a package if there are
multiple versions available and state=latest.

Fixes #34763

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

openbsd_pkg

ANSIBLE VERSION
ansible 2.2.1.0
config file = /data/git/t6n/my_project/ansible.cfg
configured module search path = Default w/o overrides
ADDITIONAL INFORMATION

I want to install OpenBSD packages with the openbsd_pkg module.
If pkg_add find multiple versions of this package, it fails.
It is independent of the flavor.

The task to reproduce:

- name: install ruby
  openbsd_pkg:
    name: ruby
    state: latest

Output before change:

fatal: [172.16.0.119]: FAILED! => {"changed": false, "failed": true, "msg": "Ambiguous: ruby could be ruby-2.3.5 ruby-2.1.9p5 ruby-1.8.7.374p9 ruby-2.2.8 ruby-2.4.2\n"}

After change it does not fail.

@t6n t6n force-pushed the t6n:opbsd_pkg_latest branch Jan 11, 2018

@t6n t6n changed the title Opbsd pkg latest openbsd_pkg: install latest package Jan 11, 2018

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Jan 11, 2018

@ansibot

This comment was marked as resolved.

Copy link
Contributor

ansibot commented Jan 11, 2018

The test ansible-test sanity --test pep8 [?] failed with the following error:

lib/ansible/modules/packaging/os/openbsd_pkg.py:252:161: E501 line too long (163 > 160 characters)

click here for bot help

@ansibot ansibot added the ci_verified label Jan 11, 2018

@Akasurde Akasurde removed the needs_triage label Jan 12, 2018

@t6n t6n force-pushed the t6n:opbsd_pkg_latest branch Jan 12, 2018

@ansibot ansibot removed the ci_verified label Jan 12, 2018

@ansibot

This comment was marked as resolved.

Copy link
Contributor

ansibot commented Jan 12, 2018

The test ansible-test sanity --test pep8 [?] failed with the following error:

lib/ansible/modules/packaging/os/openbsd_pkg.py:253:37: E128 continuation line under-indented for visual indent

click here for bot help

@ansibot ansibot added the ci_verified label Jan 12, 2018

@t6n t6n force-pushed the t6n:opbsd_pkg_latest branch Jan 12, 2018

@ansibot ansibot removed the ci_verified label Jan 12, 2018

@ansibot

This comment was marked as resolved.

Copy link
Contributor

ansibot commented Jan 12, 2018

The test ansible-test sanity --test pep8 [?] failed with the following error:

lib/ansible/modules/packaging/os/openbsd_pkg.py:253:33: E128 continuation line under-indented for visual indent

click here for bot help

@ansibot ansibot added the ci_verified label Jan 12, 2018

@t6n t6n force-pushed the t6n:opbsd_pkg_latest branch Jan 12, 2018

@ansibot ansibot removed the ci_verified label Jan 12, 2018

@ansibot

This comment was marked as resolved.

Copy link
Contributor

ansibot commented Jan 12, 2018

The test ansible-test sanity --test pep8 [?] failed with the following error:

lib/ansible/modules/packaging/os/openbsd_pkg.py:253:29: E128 continuation line under-indented for visual indent

click here for bot help

@ansibot ansibot added the ci_verified label Jan 12, 2018

@t6n t6n force-pushed the t6n:opbsd_pkg_latest branch Jan 12, 2018

@ansibot ansibot removed the ci_verified label Jan 12, 2018

@t6n t6n force-pushed the t6n:opbsd_pkg_latest branch Jan 12, 2018

@ansibot

This comment was marked as resolved.

Copy link
Contributor

ansibot commented Jan 12, 2018

The test ansible-test sanity --test pep8 [?] failed with the following error:

lib/ansible/modules/packaging/os/openbsd_pkg.py:253:49: E128 continuation line under-indented for visual indent

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 3, 2019

@dagwieers

This comment has been minimized.

Copy link
Member

dagwieers commented Feb 4, 2019

@t6n @eest What is the current status of this PR? Does it work correctly wrt. different flavors?

@dagwieers

This comment has been minimized.

Copy link
Member

dagwieers commented Feb 4, 2019

It would also help to ensure this module works correctly (in all circumstances) if we had integration tests testing idempotency, check-mode, etc. (This could be in a separate PR)

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 20, 2019

@ansibot ansibot added the packaging label Feb 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.