Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrhdolek/setup-vps
An Ansible playbook to setup VPS.
https://github.com/mrhdolek/setup-vps
ansible ansible-playbook cotabo debian docker infrastructure
Last synced: 26 days ago
JSON representation
An Ansible playbook to setup VPS.
- Host: GitHub
- URL: https://github.com/mrhdolek/setup-vps
- Owner: MrHDOLEK
- License: mit
- Created: 2022-11-14T11:03:50.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-06T12:26:12.000Z (over 1 year ago)
- Last Synced: 2024-11-15T22:35:40.504Z (3 months ago)
- Topics: ansible, ansible-playbook, cotabo, debian, docker, infrastructure
- Language: Jinja
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Ansible: VPS Setup
## Requirements
- docker
- docker-compose
or
- python
- ansible installed for your local machine## What is set up ?
- AppArmor
- Auditd
- Cron
- Iptables
- journald
- sshd
- sysctl
- timesyncd
- fail2ban
- docker and docker-compose
- create user
- off root login
- remove unnecessary services## Setup
1. `cp inventory.example inventory`
2. You need to change these variables in the inventory file to
- debian -> Ip address or hostname
- ansible_user=test -> The name of the user by which we will initiate the server. Ideally, it should be root or a
user in the sudo group
- ansible_ssh_pass=test -> Password to user above
3. You must replace in the vps.yml this value
- username -> The username to which we will be logging in
- password -> Hash of your password. To create it you need to run this
command `make create_password PASS=`### By docker
1. `make start` or `docker-compose up -d`
2. `make bash` or `docker exec -it bash`
3. `ansible-playbook -i inventory vps.yml`
4. If we want to install the selected modules then `ansible-playbook -i inventory vps.yml --tags "user,docker"`### By ansible for local machine
1. `ansible-galaxy install -r requirements.yml`
2. `ansible-playbook -i inventory vps.yml`
3. If we want to install the selected modules then `ansible-playbook -i inventory vps.yml --tags "user,docker"`## All commands
- `make help`
## FAQ
##
**Q:** Where can I get knowledge in linux administration ? ?
**A:** Collection of
knowledge [mikrus](https://www.notion.so/Biblioteka-Mikrusa-3c757621cf9b4fbfb3909fc04a77dbcf?p=9003f1758646468ebe6dbb5afb1a8f4d&pm=s)##