Skip to content

Commit 9be1ddc

Browse files
committed
Put the runner.manageStatus on the controller options
1 parent 38a5ddd commit 9be1ddc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

pkg/ansible/operator/operator.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func Run(done chan error, mgr manager.Manager, watchesPath string, reconcilePeri
4444
GVK: gvk,
4545
Runner: runner,
4646
ReconcilePeriod: reconcilePeriod,
47+
ManageStatus: runner.GetManageStatus(),
4748
}
4849
d, ok := runner.GetReconcilePeriod()
4950
if ok {

pkg/ansible/runner/runner.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ type Runner interface {
4343
Run(string, *unstructured.Unstructured, string) (RunResult, error)
4444
GetFinalizer() (string, bool)
4545
GetReconcilePeriod() (time.Duration, bool)
46+
GetManageStatus() bool
4647
}
4748

4849
// watch holds data used to create a mapping of GVK to ansible playbook or role.
@@ -273,6 +274,11 @@ func (r *runner) GetReconcilePeriod() (time.Duration, bool) {
273274
return *r.reconcilePeriod, true
274275
}
275276

277+
// GetManageStatus - get the manage status
278+
func (r *runner) GetManageStatus() bool {
279+
return r.manageStatus
280+
}
281+
276282
func (r *runner) GetFinalizer() (string, bool) {
277283
if r.Finalizer != nil {
278284
return r.Finalizer.Name, true

0 commit comments

Comments
 (0)