diff --git a/lab/inventory.ini b/lab/inventory.ini index 3329858..560731b 100644 --- a/lab/inventory.ini +++ b/lab/inventory.ini @@ -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' diff --git a/lab/setup-bare-cluster.yml b/lab/setup-bare-cluster.yml new file mode 100644 index 0000000..676f3ce --- /dev/null +++ b/lab/setup-bare-cluster.yml @@ -0,0 +1,7 @@ +--- +- hosts: lab + remote_user: cluster-master + tasks: + - name: Install K3S + become: yes + import_tasks: tasks/install-k3s.yml diff --git a/lab/tasks/install-k3s.yml b/lab/tasks/install-k3s.yml new file mode 100644 index 0000000..cd526f0 --- /dev/null +++ b/lab/tasks/install-k3s.yml @@ -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 + diff --git a/lab/tasks/setup-docker-compose.yml b/lab/tasks/setup-docker-compose.yml new file mode 100644 index 0000000..e69de29