Relative paths are inconsistent between "no team" scripts and scripts on teams; "no team" is relative to the GitOps root, while other teams' paths are specified relative to the directory the team files are in.
So, for identically located scripts, you have to specify:
[ ] Scripts in same dir as team yml (normal teams)
[ ] Scripts in same dir as team yml (no team)
[ ] Scripts in same dir as team yml, referred to from both default and normal team yml
[ ] Scripts in same dir as default yml, referred to from both default and normal yeam yml
[ ] Inline team policy with run_script pointing to the same script in each of these (no-team is a known issue, #22787; global policies can't have script automations)
[ ] Separate-file team policy in same dir with run_script
[ ] Separate-file team policy in different dir from team file with run_script
[ ] Software installer reference from same dir, +/- one level, for both normal-team and no-team
[ ] Software installer reference from install_software on policy, both for inline policy and same/+1/-1 dir level
Fleet version: 4.57.0 (likely more)
💥 Actual behavior
Relative paths are inconsistent between "no team" scripts and scripts on teams; "no team" is relative to the GitOps root, while other teams' paths are specified relative to the directory the team files are in.
So, for identically located scripts, you have to specify:
for
no-team.yml
, butfor other teams.
🧑💻 Steps to reproduce
controls
section fromteams/workstations.yml
toteams/no-team.yml
gitops.sh
against a Fleet server to apply changes🕯️ More info
99.99% sure this is a fleetctl bug.
@noahtalerman Fixing this is technically a BC break but I'm assuming that, as with #22187, we should go ahead and do it?
🛠️ To fix
Ensure
no-team.yml
paths are relative to where the file is, rather than the GitOps root.