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

pkgutil: add update all, check-mode, squashing and examples #51651

Closed
wants to merge 9 commits into from

Conversation

dagwieers
Copy link
Contributor

@dagwieers dagwieers commented Feb 2, 2019

SUMMARY

Original PR #27866 from @scathatheworm

When working with Solaris pkgutil CSW packages, I came across this module being very basic in functionality, in particular, that I could not use it to update all CSW packages.

When going into details into the code I also found it did not incorporate a possibility of doing dry-run from the underlying utility, or supported to specify multiple packages for operations.

This module probably sees very little use, but it seemed like nice functionality to add and make it behave a little more like other package modules.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

pkgutil module

ANSIBLE VERSION
ansible 2.3.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.5 (default, Aug  2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
ADDITIONAL INFORMATION
  • Added ability to upgrade all packages:
- pkgutil:
    name: '*'
    state: latest
  • Added ability to modify state of a list of packages:
- pkgutil:
    name:
    - CSWtop
    - CSWwget
    - CSWlsof
    state: present
  • Added ability to have underlying tool perform a dry-run when using check mode, pkgutil -n

  • Added ability to configure force option to force packages to state determined by repository (downgrade for example)

- pkgutil:
    name: CSWtop
    state: latest
    force: yes
  • Added more examples and documentation to show the new functionality

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 cloud core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. storage support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. zfs ZFS community labels Feb 2, 2019
@dagwieers
Copy link
Contributor Author

cc @albertomurillo @mavit @jtyr

@dagwieers
Copy link
Contributor Author

dagwieers commented Feb 2, 2019

I added integration tests, but they have not been tested (lacking any Solaris systems). Please test these changes by doing:

$ ansible-test integration --allow-unsupported --allow-destructive pkgutil -v

PS The integration tests are considered destructive because it may remove CWStop when not run successfully. So be aware.

@ansibot ansibot added the support:community This issue/PR relates to code supported by the Ansible community. label Feb 4, 2019
test/sanity/validate-modules/ignore.txt Outdated Show resolved Hide resolved
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Feb 4, 2019
@mattclay mattclay dismissed their stale review February 5, 2019 01:37

Review comments addressed. Remainder of PR not reviewed.

@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Feb 5, 2019
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 5, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 13, 2019
@mavit
Copy link
Contributor

mavit commented Feb 15, 2019

I added integration tests, but they have not been tested (lacking any Solaris systems). Please test these changes by doing:

$ ansible-test integration --allow-unsupported --allow-destructive pkgutil -v

I found that I also needed to pass --no-temp-unicode to get the tests to run on this Solaris 10 box.

@dagwieers
Copy link
Contributor Author

@mavit Can you test again ? Does the integration test work out-of-the-box ? I wasn't expecting it to be perfect, but I cannot test myself.

@mattclay
Copy link
Member

Any tests that require --no-temp-unicode to pass indicates there is a bug in the test and/or in Ansible itself that needs to be fixed. If you need help figuring out what the issue is then include details of the failure on this PR and I should be able to help.

@ansibot ansibot added packaging Packaging category and removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Feb 16, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 26, 2019
@ansibot
Copy link
Contributor

ansibot commented Jun 2, 2019

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Mar 27, 2020
@ansibot ansibot added collection Related to Ansible Collections work collection:community.general labels Apr 29, 2020
@ansibot ansibot added the needs_triage Needs a first human triage before being processed. label May 16, 2020
@mkrizek
Copy link
Contributor

mkrizek commented Aug 18, 2020

Thank you very much for your interest in Ansible. This plugin is no longer maintained in this repository and has been migrated to https://github.com/ansible-collections/community.general.

Please re-submit this issue in the above repository.

If you have further questions please stop by IRC or the mailing list:

@mkrizek mkrizek closed this Aug 18, 2020
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Aug 18, 2020
mavit added a commit to mavit/community.general that referenced this pull request Aug 18, 2020
Taken from ansible/ansible#51651 by dagwieers, which was taken from ansible/ansible#27866 by scathatheworm.  Let’s have one last attempt to get this merged.

> ##### SUMMARY
>
> Original PR #27866 from scathatheworm
>
> When working with Solaris pkgutil CSW packages, I came across this module being very basic in functionality, in particular, that I could not use it to update all CSW packages.
>
> When going into details into the code I also found it did not incorporate a possibility of doing dry-run from the underlying utility, or supported to specify multiple packages for operations.
>
> This module probably sees very little use, but it seemed like nice functionality to add and make it behave a little more like other package modules.
> ##### ISSUE TYPE
>
>     * Feature Pull Request
>
>
> ##### COMPONENT NAME
>
> pkgutil module
> ##### ANSIBLE VERSION
>
> ```
> ansible 2.3.1.0
>   config file = /etc/ansible/ansible.cfg
>   configured module search path = Default w/o overrides
>   python version = 2.7.5 (default, Aug  2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
> ```
>
> ##### ADDITIONAL INFORMATION
>
>     * Added ability to upgrade all packages:
>
>
> ```yaml
> - pkgutil:
>     name: '*'
>     state: latest
> ```
>
>     * Added ability to modify state of a list of packages:
>
>
> ```yaml
> - pkgutil:
>     name:
>     - CSWtop
>     - CSWwget
>     - CSWlsof
>     state: present
> ```
>
>     * Added ability to have underlying tool perform a dry-run when using check mode, pkgutil -n
>
>     * Added ability to configure force option to force packages to state determined by repository (downgrade for example)
>
>
> ```yaml
> - pkgutil:
>     name: CSWtop
>     state: latest
>     force: yes
> ```
>
>     * Added more examples and documentation to show the new functionality
@ansible ansible locked and limited conversation to collaborators Sep 15, 2020
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 cloud collection:community.general collection Related to Ansible Collections work feature This issue/PR relates to a feature request. has_issue module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. packaging Packaging category solaris Solaris community stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. storage support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests. zfs ZFS community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants