-
Notifications
You must be signed in to change notification settings - Fork 42
/
demo-client-machine.yml
52 lines (37 loc) · 1.1 KB
/
demo-client-machine.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env ansible-playbook
# This is a demo client. Run this playbook after running the demo-cluster to get a client with
# a kubeconfig file with access to the demo cluster
---
- name: Start up an alpine containertools image
hosts: localhost
tasks:
- name: Start up a docker container
docker_container:
name: demo-client
image: raesene/alpine-containertools
networks:
- name: kind
- name: add the host
add_host: name=demo-client
- name: install Python in the cluster
hosts: demo-client
connection: docker
gather_facts: no
tasks:
- import_tasks: ./ansible_tasks/install_python3_alpine_raw.yml
- name: Configure the demo client
hosts: demo-client
connection: docker
tasks:
- name: Create the .kube directory
file:
path: /root/.kube
state: directory
- name: Copy the Kubeconfig file
copy:
src: /tmp/demo-kubernetes-admin.conf
dest: /root/.kube/config
- name: Set the bash prompt
copy:
src: client_files/democlientbashrc
dest: /root/.bashrc