Created prepare playbook
This commit is contained in:
28
ansible/tasks/apt.yaml
Normal file
28
ansible/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
ansible/tasks/clean-motd.yaml
Normal file
13
ansible/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
ansible/tasks/disable-cloudinit.yaml
Normal file
12
ansible/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
ansible/tasks/remove-snap.yaml
Normal file
17
ansible/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"
|
10
ansible/tasks/setup-static-route.yaml
Normal file
10
ansible/tasks/setup-static-route.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
- name: "remove cloudinit config"
|
||||
file:
|
||||
path: /etc/netplan/50-cloud-init.yaml
|
||||
state: absent
|
||||
|
||||
- name: "install static config"
|
||||
template:
|
||||
src: templates/netplan.yaml
|
||||
dest: /etc/netplan/00-static.yaml
|
||||
notify: "netplan apply"
|
Reference in New Issue
Block a user