Skip to content
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

fixes broken "make run" for ansible operators #6110

Merged
merged 3 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions changelog/fragments/01-ansible-fix-make-run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: 'ansible: fixed "make run" so it finds local roles'

# kind is one of:
# - addition
# - change
# - deprecation
# - removal
# - bugfix
kind: "bugfix"

# Is this a breaking change?
breaking: false

# NOTE: ONLY USE `pull_request_override` WHEN ADDING THIS
# FILE FOR A PREVIOUSLY MERGED PULL_REQUEST!
#
# The generator auto-detects the PR number from the commit
# message in which this file was originally added.
#
# What is the pull request number (without the "#")?
# pull_request_override: 0


# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: update ansible operator Makefile's run target
body: |
For an ansible operator, update the Makefile's run target to the
following to fix a bug in its implementation.

```
.PHONY: run
ANSIBLE_ROLES_PATH?="$(shell pwd)/roles"
run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kube/config
$(ANSIBLE_OPERATOR) run
```
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ help: ## Display this help.
##@ Build

.PHONY: run
ANSIBLE_ROLES_PATH?="$(shell pwd)/roles"
run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kube/config
ANSIBLE_ROLES_PATH="$(ANSIBLE_ROLES_PATH):$(shell pwd)/roles" $(ANSIBLE_OPERATOR) run
$(ANSIBLE_OPERATOR) run

.PHONY: docker-build
docker-build: ## Build docker image with the manager.
Expand Down
3 changes: 2 additions & 1 deletion testdata/ansible/memcached-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ help: ## Display this help.
##@ Build

.PHONY: run
ANSIBLE_ROLES_PATH?="$(shell pwd)/roles"
run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kube/config
ANSIBLE_ROLES_PATH="$(ANSIBLE_ROLES_PATH):$(shell pwd)/roles" $(ANSIBLE_OPERATOR) run
$(ANSIBLE_OPERATOR) run

.PHONY: docker-build
docker-build: ## Build docker image with the manager.
Expand Down