simplifying the cluster setup

This commit is contained in:
shockrah 2024-04-23 23:45:55 -07:00
parent 8be7dfdc04
commit 0a03586b31
4 changed files with 23 additions and 6 deletions

View File

@ -1,7 +1,3 @@
[leftcoastlab]
lab
[lab]
cluster.local
[leftcoastlab:vars]
ansible_ssh_user=motheradmin
ansible_ssh_private=ssh/keys/local-net/motheradmin
ansible_ssh_common_args='-F ssh/config -o UserKnownHostsFile=ssh/hosts'

View File

@ -0,0 +1,7 @@
---
- hosts: lab
remote_user: cluster-master
tasks:
- name: Install K3S
become: yes
import_tasks: tasks/install-k3s.yml

14
lab/tasks/install-k3s.yml Normal file
View File

@ -0,0 +1,14 @@
- name: Download K3s install script
ansible.builtin.get_url:
url: https://get.k3s.io/
timeout: 120
dest: /usr/local/bin/k3s-install.sh
owner: root
group: root
mode: 0755
- name: Download K3s binary
ansible.builtin.command:
cmd: /usr/local/bin/k3s-install.sh
changed_when: true

View File