k3s: debian vm and manifest
This commit is contained in:
@@ -3,3 +3,6 @@ all:
|
||||
drone-runner:
|
||||
ansible_host: 192.168.178.200
|
||||
ansible_user: root
|
||||
k3s:
|
||||
ansible_host: 192.168.178.201
|
||||
ansible_user: debian
|
||||
|
||||
28
ansible/k3s.yml
Normal file
28
ansible/k3s.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
- name: Configure k3s VM
|
||||
hosts: k3s
|
||||
become: true
|
||||
tasks:
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
name:
|
||||
- curl
|
||||
|
||||
- name: Install k3s
|
||||
shell: curl -sfL https://get.k3s.io | sh -
|
||||
args:
|
||||
creates: /usr/local/bin/k3s
|
||||
|
||||
- name: Copy Manifest
|
||||
copy:
|
||||
src: ../kubernetes/manifest.yml
|
||||
dest: /home/debian/manifest.yml
|
||||
|
||||
- name: Allow Password Authetification
|
||||
lineinfile:
|
||||
dest=/etc/ssh/sshd_config
|
||||
regexp="^PasswordAuthentication no"
|
||||
line="PasswordAuthentication yes"
|
||||
state=present
|
||||
|
||||
- name: Restart sshd
|
||||
shell: systemctl restart sshd.service
|
||||
Reference in New Issue
Block a user