Skip to content

Commit 3b62dd0

Browse files
committed
add local task to create context
1 parent f593873 commit 3b62dd0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

roles/k8s/tasks/create_context.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Create k8s context
2+
3+
- name: Set context cluster
4+
command: kubectl config set-cluster exo --server=http://{{ k8s_master.default_ip }}:8080 --insecure-skip-tls-verify=true
5+
tags: context
6+
7+
- name: Create context
8+
command: kubectl config set-context exo --cluster=exo
9+
10+
- name: Use context
11+
command: kubectl config use-context exo

roles/k8s/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
- include: create_secgroup_rules.yml
44
- include: create_vm.yml
55
- include: create_inv.yml
6+
- include: create_context.yml

0 commit comments

Comments
 (0)