mirror of
https://github.com/lemeow125/ansible-playbooks.git
synced 2024-11-17 04:09:26 +08:00
40 lines
981 B
YAML
40 lines
981 B
YAML
---
|
|
- hosts:
|
|
- debian
|
|
# Runs on root user already
|
|
become: false
|
|
tasks:
|
|
- name: Add SSH key to authorized_hosts - Debian
|
|
authorized_key:
|
|
user: root
|
|
state: present
|
|
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
|
|
path: /root/.ssh/authorized_keys
|
|
- name: Update all packages
|
|
apt:
|
|
update_cache: true
|
|
autoremove: true
|
|
state: latest
|
|
- name: Install packages - Debian
|
|
apt:
|
|
name:
|
|
- vim
|
|
- nginx
|
|
- htop
|
|
- tmux
|
|
- samba
|
|
- docker
|
|
- docker-compose
|
|
- neofetch
|
|
- cifs-utils
|
|
- borgbackup
|
|
- curl
|
|
- syncthing
|
|
- socat
|
|
- fish
|
|
# Cache is already updated from previous step
|
|
update_cache: false
|
|
autoremove: true
|
|
state: latest
|
|
- name: Install ACME
|
|
command: curl https://get.acme.sh | sh -s email=noehbernasol0@gmail.com
|