mirror of
https://github.com/lemeow125/ansible-playbooks.git
synced 2024-11-17 04:09:26 +08:00
35 lines
820 B
YAML
35 lines
820 B
YAML
|
---
|
||
|
- hosts: all
|
||
|
# Runs on root user already
|
||
|
become: false
|
||
|
tasks:
|
||
|
- name: Add SSH key to authorized_hosts
|
||
|
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
|
||
|
apt:
|
||
|
name:
|
||
|
- vim
|
||
|
- nginx
|
||
|
- htop
|
||
|
- tmux
|
||
|
- samba
|
||
|
- docker
|
||
|
- docker-compose
|
||
|
- neofetch
|
||
|
- cifs-utils
|
||
|
- curl
|
||
|
update_cache: false
|
||
|
autoremove: true
|
||
|
state: latest
|
||
|
- name: Install ACME
|
||
|
command: curl https://get.acme.sh | sh -s email=noehbernasol0@gmail.com
|