Skip to content

package, allow to use actions over modules#85023

Draft
bcoca wants to merge 1 commit into
ansible:develfrom
bcoca:package_actions
Draft

package, allow to use actions over modules#85023
bcoca wants to merge 1 commit into
ansible:develfrom
bcoca:package_actions

Conversation

@bcoca
Copy link
Copy Markdown
Member

@bcoca bcoca commented Apr 21, 2025

#85021

ISSUE TYPE
  • Feature Pull Request

@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 21, 2025
@ansible ansible deleted a comment from ansibot Apr 21, 2025
@ansible ansible deleted a comment from ansibot Apr 21, 2025
@ansible ansible deleted a comment from ansibot Apr 22, 2025
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Apr 22, 2025
Comment thread lib/ansible/plugins/action/package.py Outdated
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 22, 2025
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Apr 22, 2025
Comment thread lib/ansible/plugins/action/package.py Outdated
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 23, 2025
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Apr 23, 2025
@ansible ansible deleted a comment from ansibot Apr 23, 2025
Comment thread lib/ansible/plugins/action/package.py Outdated
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 24, 2025
@bcoca bcoca force-pushed the package_actions branch from d1ff281 to 25e5f73 Compare April 25, 2025 14:46
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Apr 25, 2025
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 28, 2025
@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 May 6, 2025
Comment thread lib/ansible/config/base.yml
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jun 4, 2025
add ability to override/set package managers
added collection specified action plugin

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
@bcoca bcoca force-pushed the package_actions branch from 34093a5 to a595ac2 Compare June 13, 2025 14:42
@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html ci_verified Changes made in this PR are causing tests to fail. 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 Jun 13, 2025
@ansibot
Copy link
Copy Markdown
Contributor

ansibot commented Jun 13, 2025

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/plugins/action/package.py:130:21: E303: too many blank lines (2)

The test ansible-test sanity --test mypy [explain] failed with 1 error:

lib/ansible/plugins/action/package.py:36:5: return: Missing return statement

click here for bot help

BUILTIN_PKG_MGR_MODULES = {manager['name'] for manager in PKG_MGRS}

def run(self, tmp=None, task_vars=None):
def run(self, tmp: str | None = None, task_vars: dict | None = None) -> dict:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def run(self, tmp: str | None = None, task_vars: dict | None = None) -> dict:
def run(self, tmp: str | None = None, task_vars: dict | None = None) -> dict | None:

return self._execute_module(module_name=action, module_args=new_module_args, task_vars=task_vars, wrap_async=self._task.async_val)
else:
raise AnsibleActionFail('Could not detect which package manager to use. Try gathering facts or setting the "use" option.')
finally:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think MyPy is unhappy about not having an explicit return None in this branch.

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Jun 17, 2025
@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 Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci_verified Changes made in this PR are causing tests to fail. feature This issue/PR relates to a feature request. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants