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

switch to default namespace before deletion of grafana namespace #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ OR
# ansible-playbook purge-local.yml
```

NB. When you're removing you OpenShift based deployment, remember to use `oc project default` to ensure you're not in the odf-grafana namesspace.

### Adding a dashboard

If you need to add dashboards to your instance after a deployment, you can use the `add-dashboard.yml` playbook and specify the path to the dashboard file either from the all.yml file or as an extra-vars on the playbook command line.
Expand Down
5 changes: 5 additions & 0 deletions purge-grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
msg: Aborted the namespace delete
when: confirm.user_input.upper() != 'YES'

- name: Switch to default namespace before deleting '{{ grafana_namespace }}'
command:
cmd: oc project default
when: confirm.user_input.upper() == 'YES'

- name: Deleting the namespace
command:
cmd: oc delete ns {{ grafana_namespace }}
Expand Down