https://github.com/bbilly1/ansible-playbooks
A collection of Ansible playbooks I use to provision things.
https://github.com/bbilly1/ansible-playbooks
Last synced: about 1 year ago
JSON representation
A collection of Ansible playbooks I use to provision things.
- Host: GitHub
- URL: https://github.com/bbilly1/ansible-playbooks
- Owner: bbilly1
- Created: 2022-04-19T14:44:04.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-11T07:43:59.000Z (about 2 years ago)
- Last Synced: 2025-02-12T09:37:26.970Z (over 1 year ago)
- Size: 24.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible Playbooks
A collection of Ansible playbooks I use to provision things.
## Ansible VPS setup
Ansible playbook to provision a plain Ubuntu VPS from digitalocean. Expects ssh access for user root.
- Create user
- Secure ssh
- Configure ufw
### Setup
Copy or rename `vars.samle.yml` to `vars.yml` and set:
- **regular_user**: Default username to create
- **user_password**: Password for new user
- **sshd_port**: Change ssh port
### Note
The port change is tested for Ubuntu 20.04 LTS and 22.04 LTS. This wont work for 21.10, as ubuntu changed ssh to use socket based activation.
### Run on a single host
```
ansible-playbook -i $hostname, ansible-vps-setup/playbook.yml
```
## Ansible Docker Ubuntu
Ansible playbook to provision an standart Ubuntu LTS server VM. Expects the user *regular_user* to be already created.
- update and upgrade repo packages
- install basic necessities
- install `docker`
- install `docker compose`
- copy frequently used config files
- configure swap
- install maintenance services to clean trash and docker build cache
### Setup
Copy or rename `vars.samle.yml` to `vars.yml` and set:
- **regular_user**: Default username
### Run on a single host
```
ansible-playbook -i $hostname, -K ansible-docker-ubuntu/playbook.yml
```