Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Store replication log | ||
| ansible.builtin.copy: | ||
| dest: "{{ artifacts_base }}/replication/{{ replication_wave }}-{{ inventory_hostname }}.log" | ||
| content: | | ||
| {{ (rsync_result.stdout if rsync_result is defined else '') + (robocopy_result.stdout if robocopy_result is defined else '') }} |
There was a problem hiding this comment.
Copy replication logs using loop results instead of nonexistent stdout
The rsync/robocopy tasks register their results while looping over replication_sources, so the registered dictionaries only expose results[*].stdout and do not have a top-level stdout. The final "Store replication log" task concatenates rsync_result.stdout and robocopy_result.stdout, which raises 'dict object' has no attribute 'stdout' the first time replication runs and the copy task executes. This breaks the playbook even though the replication itself may have succeeded. Build the log content from rsync_result.results and robocopy_result.results (e.g. joining each item’s stdout) before writing the file.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68fbd8a981dc832584c171afa7457463