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

Make rotate_artifacts accessible from env/settings #1417

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

fkuep
Copy link

@fkuep fkuep commented Feb 21, 2025

Related to #1415

Make rotate_artifacts accessible from the settings file.

  • Modify src/ansible_runner/config/_base.py:

    • Retrieve rotate_artifacts from settings dictionary in prepare_env method.
    • Set rotate_artifacts in __init__ method only if not provided in settings dictionary.
    • Ensure rotate_artifacts is set to 0 if not provided in command line or settings file.
    • Make rotate_artifacts default to 0 in __init__ method.
    • Set rotate_artifacts from command line if provided.
  • Modify demo/env/settings:

    • Add rotate_artifacts option to the settings file.

For more details, open the Copilot Workspace session.

Related to ansible#1415

Make `rotate_artifacts` accessible from the settings file.

* Modify `src/ansible_runner/config/_base.py`:
  - Retrieve `rotate_artifacts` from `settings` dictionary in `prepare_env` method.
  - Set `rotate_artifacts` in `__init__` method only if not provided in `settings` dictionary.
  - Ensure `rotate_artifacts` is set to 0 if not provided in command line or settings file.
  - Make `rotate_artifacts` default to 0 in `__init__` method.
  - Set `rotate_artifacts` from command line if provided.

* Modify `demo/env/settings`:
  - Add `rotate_artifacts` option to the settings file.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ansible/ansible-runner/issues/1415?shareId=XXXX-XXXX-XXXX-XXXX).
@fkuep fkuep requested a review from a team as a code owner February 21, 2025 16:04
@fkuep
Copy link
Author

fkuep commented Feb 21, 2025

This one seems to work, only I wonder if the settings file should really win over the command line argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant