-
Notifications
You must be signed in to change notification settings - Fork 41
/
ssh-to-get-secrets.yml
35 lines (28 loc) · 1.01 KB
/
ssh-to-get-secrets.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
#!/usr/bin/env ansible-playbook
---
- name: Start up a kind cluster
hosts: localhost
vars:
cluster_name: sshgs
# This needs to be the cluster name with -control-plane added
container_name: sshgs-control-plane
kubernetes_version: v1.30.0
tasks:
- import_tasks: ./ansible_tasks/setup_kind_standard_config.yaml
- name: Setup Cluster
hosts: sshgs-control-plane
connection: docker
vars:
ansible_python_interpreter: /usr/bin/python3
tasks:
- import_tasks: ./ansible_tasks/setup_kubeconfig.yml
- import_tasks: ./ansible_tasks/setup_ssh_pod.yml
- name: Copy Role Manifest
copy:
src: ./manifests/secret-reader.yml
dest: /root
- name: Apply Role Manifest
command: kubectl create -f /root/secret-reader.yml
- name: Give the default service account rights to manage pods
command: kubectl create clusterrolebinding serviceaccounts-secret-reader --clusterrole=secret-reader --group=system:serviceaccounts
- import_tasks: ./ansible_tasks/print_cluster_ip.yml