Skip to content

Commit f1aa584

Browse files
authored
Updates ansible collections and ansible packages to supported versions (#105)
Signed-off-by: Trilok Geer <[email protected]>
1 parent ab6893d commit f1aa584

File tree

7 files changed

+195
-180
lines changed

7 files changed

+195
-180
lines changed

.github/workflows/test-ansible.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
- run: sudo rm -rf /usr/local/bin/kustomize
3030
- uses: actions/setup-python@v4
3131
with:
32-
python-version: '3.9'
32+
python-version: '3.12'
3333
- name: Run test e2e ansible molecule
3434
run: |
3535
env
3636
pip3 install --user --upgrade setuptools pip
37-
pip3 install --user ansible-core~=2.15.0
37+
pip3 install --user ansible-core~=2.17.4
3838
make test-e2e-ansible-molecule

images/ansible-operator/Pipfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
ansible-runner = "~=2.3.6"
7+
ansible-runner = "~=2.4.0"
88
ansible-runner-http = "~=1.0.0"
9-
ansible-core = "~=2.15.12"
10-
urllib3 = "~=1.26"
9+
ansible-core = "==2.17.4"
10+
urllib3 = "~=1.26.2"
1111
kubernetes = "==29.0.0"
1212
requests = "~=2.31.0"
1313

images/ansible-operator/Pipfile.lock

+177-162
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/ansible/controller/reconcile_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func TestReconcile(t *testing.T) {
126126
"failures": int64(0),
127127
"ok": int64(0),
128128
"skipped": int64(0),
129-
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
129+
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
130130
},
131131
"message": "Awaiting next reconciliation",
132132
"reason": "Successful",
@@ -209,7 +209,7 @@ func TestReconcile(t *testing.T) {
209209
"failures": int64(0),
210210
"ok": int64(0),
211211
"skipped": int64(0),
212-
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
212+
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
213213
},
214214
"message": "new failure message",
215215
"reason": "Failed",
@@ -326,7 +326,7 @@ func TestReconcile(t *testing.T) {
326326
"failures": int64(0),
327327
"ok": int64(0),
328328
"skipped": int64(0),
329-
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
329+
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
330330
},
331331
"message": "Awaiting next reconciliation",
332332
"reason": "Successful",
@@ -383,7 +383,7 @@ func TestReconcile(t *testing.T) {
383383
"failures": int64(0),
384384
"ok": int64(0),
385385
"skipped": int64(0),
386-
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
386+
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
387387
},
388388
"message": "Awaiting next reconciliation",
389389
"reason": "Successful",
@@ -432,7 +432,7 @@ func TestReconcile(t *testing.T) {
432432
"failures": int64(0),
433433
"ok": int64(0),
434434
"skipped": int64(0),
435-
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
435+
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
436436
},
437437
"message": "Failed to get ansible-runner stdout",
438438
},

internal/ansible/runner/eventapi/types.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ type EventTime struct {
5252

5353
// UnmarshalJSON - override unmarshal json.
5454
func (e *EventTime) UnmarshalJSON(b []byte) (err error) {
55-
e.Time, err = time.Parse("2006-01-02T15:04:05.999999999", strings.Trim(string(b[:]), "\"\\"))
55+
e.Time, err = time.Parse("2006-01-02T15:04:05.999999999+00:00", strings.Trim(string(b[:]), "\"\\"))
5656
return
5757
}
5858

5959
// MarshalJSON - override the marshal json.
6060
func (e EventTime) MarshalJSON() ([]byte, error) {
61-
return []byte(fmt.Sprintf("\"%s\"", e.Time.Format("2006-01-02T15:04:05.99999999"))), nil
61+
return []byte(fmt.Sprintf("\"%s\"", e.Time.Format("2006-01-02T15:04:05.99999999+00:00"))), nil
6262
}
6363

6464
// JobEvent - event of an ansible run.

pkg/plugins/ansible/v1/scaffolds/internal/templates/requirements.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ collections:
3838
- name: operator_sdk.util
3939
version: "0.5.0"
4040
- name: kubernetes.core
41-
version: "2.4.0"
41+
version: "3.2.0"
4242
- name: cloud.common
43-
version: "2.1.1"
43+
version: "3.0.0"
4444
- name: community.docker
45-
version: "3.10.3"
45+
version: "3.12.1"
4646
`

testdata/memcached-molecule-operator/requirements.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ collections:
33
- name: operator_sdk.util
44
version: "0.5.0"
55
- name: kubernetes.core
6-
version: "2.4.0"
6+
version: "3.2.0"
77
- name: cloud.common
8-
version: "2.1.1"
8+
version: "3.0.0"
99
- name: community.docker
10-
version: "3.10.3"
10+
version: "3.12.1"

0 commit comments

Comments
 (0)