Tidy-up
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: Disable swap on Raspberries
|
||||
hosts: all
|
||||
roles:
|
||||
- common
|
||||
become: yes
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Disable swap
|
||||
ansible.builtin.shell: sudo swapoff -a
|
||||
|
||||
- name: Reboot
|
||||
ansible.builtin.reboot:
|
||||
test_command: uptime
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
all:
|
||||
children:
|
||||
kubernetes:
|
||||
hosts:
|
||||
192.168.0.51:
|
||||
192.168.0.52:
|
||||
192.168.0.53:
|
||||
192.168.0.54:
|
||||
kube_masters:
|
||||
hosts:
|
||||
192.168.0.51:
|
||||
kube_workers:
|
||||
hosts:
|
||||
192.168.0.52:
|
||||
192.168.0.53:
|
||||
192.168.0.54:
|
||||
docker:
|
||||
hosts:
|
||||
192.168.0.50:
|
||||
zero:
|
||||
hosts:
|
||||
192.168.0.49:
|
||||
192.168.0.55:
|
||||
192.168.0.48:
|
||||
vars:
|
||||
ansible_ssh_private_key_file = /home/vraducanu/.ssh/id_rsa
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
- name: Install MicroK8s on Raspberries
|
||||
hosts: kubernetes
|
||||
roles:
|
||||
- common
|
||||
become: yes
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Install MicroK8s
|
||||
ansible.builtin.snap:
|
||||
channel: stable
|
||||
classic: true
|
||||
name: microk8s
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- name: Display install outcome
|
||||
ansible.builtin.debug:
|
||||
var: result.stdout_lines
|
||||
|
||||
- name: Install kubectl
|
||||
ansible.builtin.snap:
|
||||
channel: stable
|
||||
classic: true
|
||||
name: kubectl
|
||||
state: present
|
||||
|
||||
- name: Create kubectl config folder
|
||||
ansible.builtin.file:
|
||||
path: ~/.kube
|
||||
state: directory
|
||||
mode: "0644"
|
||||
|
||||
- name: Populate kubectl config file
|
||||
ansible.builtin.command:
|
||||
cmd: sudo microk8s config > ~/.kube/config
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: Remove MicroK8s from Raspberries
|
||||
hosts: kubernetes
|
||||
roles:
|
||||
- common
|
||||
become: yes
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Uninstall MicroK8s
|
||||
community.general.snap:
|
||||
name: microk8s
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- name: Display uninstall outcome
|
||||
ansible.builtin.debug:
|
||||
var: result.stdout_lines
|
||||
@@ -0,0 +1,10 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
34323466633533666237623830316138373237326134336236613536633664373564633163613230
|
||||
3938393338663632613061646365613630373635613536360a613039306363616432633030306334
|
||||
33353839346339393965616234323561306338626533363238306662383938626364303061633332
|
||||
6230623361393438610a383230376431373034306331376536313831633366373665393866373338
|
||||
65313334623131323931353436623265623033396266623364313934383865386532623630336164
|
||||
32653432613065303363303730353864353739633530376637333662303134613339353062303932
|
||||
33646466383561373264333734626364663763393766666664653365386230393562626563376265
|
||||
63303939363932636266303566363062643166343064343762313339353839326361383062653036
|
||||
6232
|
||||
Reference in New Issue
Block a user