Skip to content

Commit

Permalink
Merge pull request #973 from rabi/job_status
Browse files Browse the repository at this point in the history
Don't patch ansibleee if the job has completed
  • Loading branch information
openshift-merge-bot[bot] authored Jul 25, 2024
2 parents e569d04 + c548231 commit 76b8535
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/dataplane/util/ansible_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ func AnsibleExecution(
if err != nil && !k8serrors.IsNotFound(err) {
return err
}

// Don't patch and re-run jobs if the job status is already completed.
if ansibleEE != nil && ansibleEE.Status.JobStatus == ansibleeev1.JobStatusSucceeded {
return nil
}

if ansibleEE == nil {
ansibleEE = &ansibleeev1.OpenStackAnsibleEE{
ObjectMeta: metav1.ObjectMeta{
Expand Down

0 comments on commit 76b8535

Please sign in to comment.