Skip to content

Commit

Permalink
fix: KUBECONFIG is now required
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Sep 19, 2024
1 parent 8626a59 commit f7a5ec2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/player/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
fp_play: SetMe

# The user's kubernetes configuration file.
# The user must set KUBECONFIG - we do not assume ~/.kube/config
fp_kubeconfig_file: "{{ lookup('env', 'KUBECONFIG') }}"
# The user must define this variable - we no-longer rely on KUBECONFIG.
fp_kubeconfig_file: SetMe

# The namespace that is expected to exist.
fp_namespace: fragmentor
Expand Down
6 changes: 6 additions & 0 deletions roles/player/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
- k8s_auth_host|length > 0
- k8s_auth_api_key|length > 0

- name: Assert kubeconfig file is named
assert:
that:
- fp_kubeconfig_file|length > 0
- fp_kubeconfig_file!='SetMe'

# Go...

# There is no 'undeploy' fragmentation is a 'Job'
Expand Down

0 comments on commit f7a5ec2

Please sign in to comment.