-
It seems my temporary script files aren't being deleted....even though I see a Is there something I'm missing or doing wrong?
user: ubuntu
ssh_key: /home/ubuntu/.ssh/id_rsa
ssh_shell: /bin/bash
local_shell: /bin/bash
inventory: inventory.yml
tasks:
- name: Check known rails issue 366450
targets: ["gitlab_rails"]
commands:
- name: Condition check
script: |
rm -f /tmp/366450
version=${GITLAB_VERSION//./}
if [[ $version -gt 1500 && $version -lt 1630 ]]; then
touch /tmp/366450
fi
- name: Checking for known issue
script: |
if grep -s 'OmniAuth::Strategies::SAML' /etc/gitlab/gitlab.rb | grep strategy_class; then
touch /tmp/366450_warning
fi
on_exit: "rm -fv /tmp/366450"
options: {ignore_errors: true, sudo: true}
cond: "test -f /tmp/366450"
- name: Display warning message
echo: "If you're using SAML for OmniAuth you might be running into known issue https://gitlab.com/gitlab-org/gitlab/-/issues/366450"
on_exit: "rm -fv /tmp/366450_warning"
cond: "test -f /tmp/366450_warning"
ubuntu@sr-env-049aca04-omnibus:~$ ls -ltr /tmp/spot*
ls: cannot access '/tmp/spot*': No such file or directory
ubuntu@sr-env-049aca04-omnibus:~$ ./spot -p rails_known_issues.yml --env GITLAB_VERSION:16.0.0
spot v1.16.1-3c62f53-2024-10-23T16:26:56Z
[omnibus localhost:22] run task "Check known rails issue 366450", commands: 3
[omnibus localhost:22] completed command "Condition check" {script: /bin/sh -c [multiline script]} (1.027s)
[omnibus localhost:22] completed command "Checking for known issue" {script: /bin/sh -c [multiline script]} (121ms)
[omnibus localhost:22] completed command "Display warning message" {echo: If you're using SAML for OmniAuth you might be running into known issue https://gitlab.com/gitlab-org/gitlab/-/issues/366450} (6ms)
[omnibus localhost:22] completed task "Check known rails issue 366450", commands: 3 (1.211s)
ubuntu@sr-env-049aca04-omnibus:~$ ls -ltr /tmp/spot*
-rwx------ 1 ubuntu ubuntu 176 Dec 18 20:08 /tmp/spot-script4216482464
-rwx------ 1 ubuntu ubuntu 172 Dec 18 20:08 /tmp/spot-script897356897
ubuntu@sr-env-049aca04-omnibus:~$ |
Beta Was this translation helpful? Give feedback.
Answered by
umputun
Dec 19, 2024
Replies: 3 comments 1 reply
-
@umputun any ideas on this one? |
Beta Was this translation helpful? Give feedback.
1 reply
-
released as a part of 1.6.2 hotfix version |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dstull
-
pulled and confirmed ubuntu@sr-env-049aca04-omnibus:~$ ls -ltr /tmp/spot*
ls: cannot access '/tmp/spot*': No such file or directory
ubuntu@sr-env-049aca04-omnibus:~$ ./spot -p rails_known_issues.yml --env GITLAB_VERSION:1600
spot v1.16.2-1cf9c8b-2024-12-19T21:34:18Z
[omnibus localhost:22] run task "Check known rails issue 366450", commands: 4
[omnibus localhost:22] completed command "Condition check" {script: /bin/sh -c [multiline script]} (881ms)
[omnibus localhost:22] completed command "Checking for known issue" {script: /bin/sh -c [multiline script]} (89ms)
[omnibus localhost:22] completed command "Display warning message" {skip: Display warning message} (7ms)
[omnibus localhost:22] completed command "Cleanup temp files" {script: /bin/sh -c [multiline script]} (47ms)
[omnibus localhost:22] completed task "Check known rails issue 366450", commands: 4 (1.081s)
[omnibus localhost:22] run task "Fake issue that will fail", commands: 4
[omnibus localhost:22] completed command "Condition check" {script: /bin/sh -c [multiline script]} (234ms)
[omnibus localhost:22] completed command "Checking condition for known fake issue" {script: /bin/sh -c [multiline script]} (56ms)
[omnibus localhost:22] completed command "Display warning message" {echo: If this is set to backups, that is wrong. Make sure you fix that.} (13ms)
[omnibus localhost:22] completed command "Cleanup temp files" {script: /bin/sh -c [multiline script]} (36ms)
[omnibus localhost:22] completed task "Fake issue that will fail", commands: 4 (400ms)
ubuntu@sr-env-049aca04-omnibus:~$ ls -ltr /tmp/spot*
ls: cannot access '/tmp/spot*': No such file or directory Thanks @umputun ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
released as a part of 1.6.2 hotfix version