mirror of
https://github.com/lemeow125/ansible-playbooks.git
synced 2025-04-27 02:01:19 +08:00
Update folder structure
This commit is contained in:
parent
ddf67b68a7
commit
2250c1c093
8 changed files with 12 additions and 11 deletions
40
roles/tasks/debian/setup.yml
Normal file
40
roles/tasks/debian/setup.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
- 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
|
14
roles/tasks/debian/update.yml
Normal file
14
roles/tasks/debian/update.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- hosts:
|
||||
- debian
|
||||
# Runs on root user already
|
||||
become: false
|
||||
tasks:
|
||||
- name: Update all packages
|
||||
apt:
|
||||
update_cache: true
|
||||
autoremove: true
|
||||
state: latest
|
||||
when: ansible_distribution in ["Debian"]
|
||||
- name: Update ACME
|
||||
command: /root/.acme.sh/acme.sh --upgrade --auto-upgrade
|
Loading…
Add table
Add a link
Reference in a new issue