2 - name: "Ensure the .ssh directory exists"
4 path: "{{ ansible_env.HOME }}/.ssh"
8 - name: "Ensure {{ cluster_config_dir }} is present"
10 path: "{{ cluster_config_dir }}"
14 - name: Generate cluster wide ssh key pair
15 command: "ssh-keygen -q -b 4096 -t rsa -N '' -f {{ cluster_config_dir }}/cluster_key"
17 creates: "{{ cluster_config_dir }}/cluster_key"
19 - name: Get ssh public key
21 src: "{{ cluster_config_dir }}/cluster_key.pub"
22 register: cluster_public_key_out
24 - name: Decode ssh public key
26 cluster_public_key: "{{ cluster_public_key_out.content | b64decode }}"
28 - name: Prepare rke cluster.yml
31 dest: "{{ cluster_config_dir }}/cluster.yml"
34 - name: Prepare rke addon manifest (dashboard)
36 src: kubernetes-dashboard.yaml.j2
37 dest: "{{ cluster_config_dir }}/kubernetes-dashboard.yml"
39 - name: Prepare rke addon manifest (dashboard user)
41 src: k8s-dashboard-user.yml.j2
42 dest: "{{ cluster_config_dir }}/k8s-dashboard-user.yml"
44 - name: Install rke cli tool
46 src: "{{ app_data_path }}/downloads/{{ rke_binary }}"
47 dest: "{{ rke_bin_dir }}/rke"