Skip to content

make ansiballz use module tmp#82041

Open
bcoca wants to merge 2 commits intoansible:develfrom
bcoca:ansiballz_module_temp
Open

make ansiballz use module tmp#82041
bcoca wants to merge 2 commits intoansible:develfrom
bcoca:ansiballz_module_temp

Conversation

@bcoca
Copy link
Member

@bcoca bcoca commented Oct 19, 2023

handle all corner cases, ensure we always have a tmp dir value
moved 'none' protection to modify module

fixes #27699

ISSUE TYPE
  • Bugfix Pull Request

@ansibot ansibot added bug This issue/PR relates to a bug. 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 Oct 19, 2023
@bcoca bcoca marked this pull request as draft October 23, 2023 15:28
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Oct 24, 2023
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Oct 31, 2023
@webknjaz
Copy link
Member

This breaks the become_unprivileged integration test. I've extracted the traceback for you:

Traceback (most recent call last):
  File "/var/tmp/ansible-tmp-1698688162.544127-2727-11062176442149/AnsiballZ_setup.py", line 281, in <module>
    _ansiballz_main()
  File "/var/tmp/ansible-tmp-1698688162.544127-2727-11062176442149/AnsiballZ_setup.py", line 261, in _ansiballz_main
    temp_path = tempfile.mkdtemp(prefix='ansible_' + 'ansible.legacy.setup' + '_payload_', dir=os.path.expanduser('~/.ansible/tmp'))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tempfile.py", line 368, in mkdtemp
    _os.mkdir(file, 0o700)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/unpriv2/.ansible/tmp/ansible_ansible.legacy.setup_payload_fcwe9ni5'

@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 Nov 8, 2023
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Nov 15, 2023
@ansibot ansibot added the stale_pr This PR has not been pushed to for more than one year. label Jan 28, 2025
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Apr 7, 2025
@bcoca bcoca force-pushed the ansiballz_module_temp branch from d2e9b0a to 7b67f98 Compare June 6, 2025 15:16
@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_pr This PR has not been pushed to for more than one year. 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 6, 2025
@ansibot

This comment was marked as resolved.

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Jun 9, 2025
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html 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 16, 2025
@bcoca bcoca force-pushed the ansiballz_module_temp branch from 5320a2b to e83b696 Compare February 26, 2026 17:15
@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Feb 26, 2026
@ansibot ansibot added pending_ci and removed 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. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. pending_ci labels Feb 26, 2026
@bcoca bcoca marked this pull request as ready for review February 26, 2026 23:10
@bcoca bcoca added needs_triage Needs a first human triage before being processed. labels Feb 26, 2026
@bcoca bcoca force-pushed the ansiballz_module_temp branch 2 times, most recently from b7d2c56 to b20bb60 Compare February 27, 2026 13:35
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Mar 5, 2026
@bcoca bcoca force-pushed the ansiballz_module_temp branch from 6caf993 to ff75b8a Compare March 5, 2026 15:34
@bcoca bcoca force-pushed the ansiballz_module_temp branch from 2bad539 to 1572368 Compare March 5, 2026 18:07
@ansibot ansibot added the stale_review Updates were made after the last review and the last review is more than 7 days old. label Mar 5, 2026
@mattclay mattclay removed the needs_triage Needs a first human triage before being processed. label Mar 5, 2026
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Mar 5, 2026
bcoca added 2 commits March 13, 2026 10:52
 * fallback to system in case original is not usable,
   most likely due to permissions.
 * added tests, also to ensure we copy the ansiballz to the correct remote
 * modify exisitng test to account for remote users and a-t
@bcoca bcoca force-pushed the ansiballz_module_temp branch from 58c22a2 to 9e4276e Compare March 13, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue/PR relates to a bug. has_issue stale_review Updates were made after the last review and the last review is more than 7 days old.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remote_tmp is not used for module files

6 participants