-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Roles on OpenStackDataPlaneService #1227
Support Roles on OpenStackDataPlaneService #1227
Conversation
/test openstack-operator-build-deploy-kuttl |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bshephar, fao89 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/b6e4a6ae5f4c4408803affe3a223b339 ✔️ openstack-k8s-operators-content-provider SUCCESS in 39m 30s |
recheck |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/7d3c5efa43ab47f6b9388184c3eb3b65 ❌ openstack-k8s-operators-content-provider FAILURE in 4m 54s |
recheck |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/2a72402dc12c41fea60555ebb281990d ❌ openstack-k8s-operators-content-provider FAILURE in 4m 58s |
/retest |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8244968d080a409aa729d9b1229f3553 ❌ openstack-k8s-operators-content-provider FAILURE in 5m 02s |
recheck |
pkg/dataplane/util/ansibleee.go
Outdated
if len(args) == 0 { | ||
if len(playbook) == 0 { | ||
playbook = CustomPlaybook | ||
if len(a.PlaybookContents) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this changes the old behavior. Earlier Playbook
provided used to supersede PlaybookContents
. Now it's the reverse and role
provided supersedes both of them. Is that what we want now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
playbook
, playbookContents
and role
are not mandatory fields, so we need to check which one isn't empty. Ideally, we shouldn't supersede, but it would happen when more than one field is filled. I think we might need a validation to ensure only one of the three fields is filed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah either have a validation or ensure that there is proper prededence. playbook->playbookContent->role
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the precedence
644cc34
to
793f0b1
Compare
playbook = CustomPlaybook | ||
artifact := a.Role | ||
param := "-r" | ||
if len(artifact) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we still saying role if provided has the highest precedence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh! I misplaced the order
caeea64
to
71f44e9
Compare
Additionally to playbooks, it enables running roles directly with ansible-runner closes OSPRH-12358 Signed-off-by: Fabricio Aguiar <[email protected]>
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8b7b5f2afc934cf7ad88b209cd5335c6 ✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 10m 45s |
recheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
3fb4708
into
openstack-k8s-operators:main
Additionally to playbooks, it enables running roles directly with ansible-runner
closes OSPRH-12358