Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions demo/env/settings
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
idle_timeout: 600
job_timeout: 3600
pexpect_timeout: 10
rotate_artifacts: 2
7 changes: 4 additions & 3 deletions src/ansible_runner/config/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(self,
container_workdir: str | None = None,
container_auth_data=None,
ident: str | None = None,
rotate_artifacts: int = 0,
rotate_artifacts: int | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not seeing a reason for this change. If you revert it back, you can also just revert your change below on line 113, and it will work as you expect.

timeout: int | None = None,
ssh_key: str | None = None,
quiet: bool = False,
Expand Down Expand Up @@ -110,7 +110,7 @@ def __init__(self,
self.container_options = container_options

# runner params
self.rotate_artifacts = rotate_artifacts
self.rotate_artifacts = rotate_artifacts if rotate_artifacts is not None else 0
self.quiet = quiet
self.json_mode = json_mode
self.passwords = passwords
Expand Down Expand Up @@ -148,7 +148,6 @@ def __init__(self,
else:
self.project_dir = project_dir

self.rotate_artifacts = rotate_artifacts
self.fact_cache_type = fact_cache_type
self.fact_cache = os.path.join(self.artifact_dir, fact_cache or 'fact_cache') if self.fact_cache_type == 'jsonfile' else None

Expand Down Expand Up @@ -228,6 +227,8 @@ def prepare_env(self, runner_mode: str = 'pexpect') -> None:
self.container_options = self.settings.get('container_options', self.container_options)
self.container_auth_data = self.settings.get('container_auth_data', self.container_auth_data)

self.rotate_artifacts = self.settings.get('rotate_artifacts', self.rotate_artifacts)

if self.containerized:
if not self.container_image:
raise ConfigurationError(
Expand Down