https://github.com/ct-open-source/telerec-t-base
Basic Ansible Setup for a server with Traefik, Portainer and Watchtower
https://github.com/ct-open-source/telerec-t-base
Last synced: about 1 year ago
JSON representation
Basic Ansible Setup for a server with Traefik, Portainer and Watchtower
- Host: GitHub
- URL: https://github.com/ct-open-source/telerec-t-base
- Owner: ct-Open-Source
- License: gpl-3.0
- Created: 2023-09-27T15:26:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-12T20:35:09.000Z (over 2 years ago)
- Last Synced: 2025-02-14T19:50:08.670Z (over 1 year ago)
- Size: 27.3 KB
- Stars: 53
- Watchers: 11
- Forks: 12
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# telerec-t-base
Basic Ansible Setup for a server with Traefik, Portainer, Autoheal and Watchtower.
Clone this repository with submodules:
```shell
git clone --recurse-submodules https://github.com/ct-Open-Source/telerec-t-base.git
```
## Install ansible
First install `sshpass` for the first login without public key. On Ubuntu or Debian use:
```shell
sudo apt install sshpass
```
Then [install Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
We recommend using `pipenv` with the Pipfile in the repository:
```shell
cd telerec-t-base
pipenv install
```
The following commands use `pipenv` to run the ansible commands from within the virtual environment.
If you installed Ansible without a virtualenv remove the trailing `pipenv run ` from the following commands.
### Install ansible modules
Ansible can be extended in different ways. To keep it small by default there is a plug-in repository called
"Ansible Galaxy". For this setup you need these two plug-ins (also called "modules"):
```shell script
pipenv run ansible-galaxy collection install ansible.posix
pipenv run ansible-galaxy collection install community.general
pipenv run ansible-galaxy role install geerlingguy.docker
```
## Run the playbook
For the first server setup you need to allow login with `--ask-pass`:
```shell
pipenv run ansible-playbook initial-setup.yml -i hosts --ask-pass --ask-become-pass
```
```shell script
pipenv run ansible-playbook server-setup.yml -i hosts
```