meme
This commit is contained in:
commit
034e8ef0a7
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.vault_password_file
|
||||||
|
venv/
|
11
inventory.yaml
Normal file
11
inventory.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
all:
|
||||||
|
vars:
|
||||||
|
ansible_become: true
|
||||||
|
ansible_user: ubuntu
|
||||||
|
hosts:
|
||||||
|
kube-master-luna:
|
||||||
|
kube-worker-luna:
|
||||||
|
kube-master-mckay:
|
||||||
|
kube-worker-mckay:
|
||||||
|
kube-master-woolsey:
|
||||||
|
kube-worker-woolsey:
|
15
prepare.yaml
Normal file
15
prepare.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
- name: "prepare vms for kmlabs-k8s-cluster"
|
||||||
|
hosts: all
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: "do apt stuff"
|
||||||
|
import_tasks: tasks/apt.yaml
|
||||||
|
|
||||||
|
- name: "disable cloudinit"
|
||||||
|
import_tasks: tasks/disable-cloudinit.yaml
|
||||||
|
|
||||||
|
- name: "remove snap"
|
||||||
|
import_tasks: tasks/remove-snap.yaml
|
||||||
|
|
||||||
|
- name: "clean motd"
|
||||||
|
import_tasks: tasks/clean-motd.yaml
|
28
tasks/apt.yaml
Normal file
28
tasks/apt.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
- name: "Remove ubuntu stuff"
|
||||||
|
apt:
|
||||||
|
state: absent
|
||||||
|
name: ubutu-server
|
||||||
|
autoremove: yes
|
||||||
|
|
||||||
|
- name: "Install my favourite applications"
|
||||||
|
apt:
|
||||||
|
state: present
|
||||||
|
name:
|
||||||
|
- tmux
|
||||||
|
- htop
|
||||||
|
- dnsutils
|
||||||
|
- needrestart
|
||||||
|
- curl
|
||||||
|
- wget
|
||||||
|
- netcat-openbsd
|
||||||
|
- tree
|
||||||
|
- net-tools
|
||||||
|
- nano
|
||||||
|
- psmisc
|
||||||
|
- python3
|
||||||
|
- python3-venv
|
||||||
|
- strace
|
||||||
|
- ifstat
|
||||||
|
- tcpdump
|
||||||
|
- xxd
|
||||||
|
- git
|
13
tasks/clean-motd.yaml
Normal file
13
tasks/clean-motd.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# This changes permissions so update motd can not read it
|
||||||
|
- name: clean motd
|
||||||
|
file:
|
||||||
|
state: file
|
||||||
|
path: /etc/update-motd.d/{{ item }}
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0000"
|
||||||
|
with_items:
|
||||||
|
- 10-help-text
|
||||||
|
- 50-landscape-sysinfo
|
||||||
|
- 50-motd-news
|
||||||
|
- 91-release-upgrade
|
12
tasks/disable-cloudinit.yaml
Normal file
12
tasks/disable-cloudinit.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
- name: disable cloudinit
|
||||||
|
copy:
|
||||||
|
content: ""
|
||||||
|
dest: /etc/cloud/cloud-init.disabled
|
||||||
|
force: no
|
||||||
|
|
||||||
|
- name: disable network autoconfig
|
||||||
|
copy:
|
||||||
|
content: "network: {config: disabled}"
|
||||||
|
dest: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
|
||||||
|
force: no
|
||||||
|
|
17
tasks/remove-snap.yaml
Normal file
17
tasks/remove-snap.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
- name: Remove snapd from Ubuntu
|
||||||
|
apt:
|
||||||
|
name: snapd
|
||||||
|
state: absent
|
||||||
|
purge: yes
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
|
- name: Remove snapd-related directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
with_items:
|
||||||
|
- /snap
|
||||||
|
- /var/snap
|
||||||
|
- /var/lib/snapd
|
||||||
|
- "/home/{{ ansible_user }}/snap"
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
Loading…
Reference in New Issue
Block a user