infra/roles/common/tasks/main.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

---
- block:
- name: Remove /etc/apt/sources.list (May contain cdroms…)
file:
path: /etc/apt/sources.list
state: absent
- name: Setup apt source list for buster
copy:
dest: /etc/apt/sources.list.d/debian.list
content: |
deb https://deb.debian.org/debian buster main non-free contrib
deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb https://deb.debian.org/debian buster-updates main
- name: Update via apt
apt: update_cache=yes
- name: Install some usefull packages
apt:
state: present
name:
- aptitude
- ntp
- rsync
- fail2ban
- emacs25-nox
- vim-nox
- htop
- ncdu
- tcpdump
- python3
- python3-pip
- python3-dev
- python3-venv
- python3-setuptools
- python3-wheel
- sudo
- name: Set some authorized keys
authorized_key: user=root key="{{item}}"
with_items: "{{ authorized_keys }}"
- name: Ensure mlocate and locate are not installed
apt:
name: ["mlocate", "locate"]
state: absent
tags: common