mirror of
https://github.com/lemeow125/ansible-playbooks.git
synced 2024-11-17 04:09:26 +08:00
Add first playbooks
This commit is contained in:
parent
15738b747e
commit
364b3d4881
5 changed files with 55 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -166,3 +166,5 @@ cython_debug/
|
||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
**/__pycache__/
|
**/__pycache__/
|
||||||
|
|
||||||
|
.vscode/
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"ansible.python.interpreterPath": "c:\\Users\\keannu125\\AppData\\Local\\Programs\\Python\\Python311\\python.exe"
|
||||||
|
}
|
|
@ -1,3 +1,3 @@
|
||||||
10.0.10.4
|
10.0.10.4
|
||||||
10.0.10.141
|
|
||||||
10.0.10.64
|
10.0.10.64
|
||||||
|
10.0.10.141
|
35
setup.yml
Normal file
35
setup.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
- 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
|
12
update.yml
Normal file
12
update.yml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
# Runs on root user already
|
||||||
|
become: false
|
||||||
|
tasks:
|
||||||
|
- name: Update all packages
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
autoremove: true
|
||||||
|
state: latest
|
||||||
|
- name: Update ACME
|
||||||
|
command: /root/.acme.sh/acme.sh --upgrade --auto-upgrade
|
Loading…
Reference in a new issue