Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to ansible #2

Merged
merged 25 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: ansible-lint
on:
pull_request:
branches: ["main", "stable", "release/v*"]
jobs:
build:
name: Ansible Lint # Naming the build is important to use it as a status check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@main # or version tag instead of 'main'
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ db
wordpress
./**/.venv
.venv
.vscode
.vscode
.DS_Store
pw_vault.txt
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<h1 align="center">
<br />
Dodger

![dodger Logo](https://github.com/stefanDeveloper/dodger/assets/18898803/baa4278f-ef46-4227-a08c-cfb8445c17a4?raw=true)
</h1>
<h4 align="center">Be sure to :star: my configuration repo so you can keep up to date on any daily progress!</h4>
<div align="center">
<h4>
<a href="https://github.com/stefanDeveloper/dodger"><img src="https://img.shields.io/github/stars/stefanDeveloper/dodger.svg?style=plasticr"/></a>
<a href="https://github.com/stefanDeveloper/dodger/commits/main"><img src="https://img.shields.io/github/last-commit/stefanDeveloper/dodger.svg?style=plasticr"/></a>
<a href="https://github.com/stefanDeveloper/dodger/commits/main"><img src="https://img.shields.io/github/commit-activity/y/stefanDeveloper/dodger.svg?style=plasticr"/></a>
<a href="https://github.com/stefanDeveloper/dodger"><img src="https://img.shields.io/github/stars/stefanDeveloper/dodger.svg?style=for-the-badge"/></a>
<a href="https://github.com/stefanDeveloper/dodger/commits/main"><img src="https://img.shields.io/github/last-commit/stefanDeveloper/dodger.svg?style=for-the-badge"/></a>
<a href="https://github.com/stefanDeveloper/dodger/commits/main"><img src="https://img.shields.io/github/commit-activity/y/stefanDeveloper/dodger.svg?style=for-the-badge"/></a>
</h4>
</div>

Expand All @@ -18,13 +19,10 @@ This repository provides a complete Docker stack to easily set up your server wi
## Supported Applications

* [Traefik](./traefik/README.md) as a reverse proxy to route your request (mandatory)
* [Wordpress](./blog/README.md) just a simple Wordpress blog page
* [Crowdsec](./Crowdsec/README.md) just the best firewall handler
* [GitLab](./gitlab/README.md) for coding
* [Portainer](./portainer/README.md) helps you to maintain your containers and images
* [Nextcloud](./Nextcloud/README.md) one of my favorite private clouds :heart:
* [Homer](./homer/README.md) just a landing page with links
* [Resilio](./resilio/README.md) allows you to sync your data with others, helpful to share backups
* [Seafile](./seafile/README.md) another cloud (not used by me anymore)
* [OpenLDAP](./openldap/README.md) configuration for easy usage with GUI.
* [Matrix](./matrix/README.md) Synapse server with LDAP configuration.
* [Hugo](./hugo/README.md) hugo server to deploy simple website.
Expand All @@ -38,11 +36,19 @@ Just clone this repository and follow each guideline inside the corresponding ap
git clone https://github.com/stefanDeveloper/dodger.git
```

In each of these folders you will find a `docker-compose.yml`, a `.env` file, as well as a `README.md` that describes some basics about this application.
Deploying made simple by applying Ansible Playbooks including hardening, installs and more!

In case you want to run applications individually, please make sure your Docker environment has a network called `proxy`. If this is not the case, please run:
Create Python virtualenv and install requirements:

```sh
docker network create proxy
```bash
python -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt
```

Replace your IP address in the `inventory.yml` and run the provided Ansible playbook:

```bash
ansible-playbook dodger_deploy.yml
```
9 changes: 9 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[defaults]
nocows = True
forks = 10
allow_world_readable_tmpfiles=true
inventory = ./inventory.yml
vault_password_file = pw_vault.txt

[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ServerAliveInterval=50 -o ServerAliveCountMax=999
21 changes: 0 additions & 21 deletions ansible/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions ansible/ansible.cfg

This file was deleted.

8 changes: 0 additions & 8 deletions ansible/inventory.yml

This file was deleted.

1 change: 0 additions & 1 deletion ansible/roles/default/defaults/main.yml

This file was deleted.

Binary file added assets/dodger_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions assets/dodger_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions blog/.env

This file was deleted.

2 changes: 0 additions & 2 deletions blog/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions blog/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions blog/docker-compose.yaml

This file was deleted.

File renamed without changes.
15 changes: 10 additions & 5 deletions ansible/dodger_deploy.yml → dodger_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check failure on line 1 in dodger_deploy.yml

View workflow job for this annotation

GitHub Actions / Ansible Lint

internal-error

Unexpected error code 1 from execution of: ansible-playbook -i localhost, --syntax-check dodger_deploy.yml
- name: Setup dodger
hosts: dodger
become: true
Expand All @@ -10,8 +10,13 @@
- name: default
- name: robertdebock.update
- name: docker
tasks:
- name: Clone repository
ansible.builtin.git:
repo: https://github.com/stefanDeveloper/dodger.git
dest: /srv/dodger
- name: crowdsec
- name: traefik
- name: openldap
- name: gitlab
- name: homer
- name: nextcloud
- name: watchtower
- name: matrix

# code: language=ansible
5 changes: 0 additions & 5 deletions gitlab/.env

This file was deleted.

94 changes: 0 additions & 94 deletions gitlab/docker-compose.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions homer/.env

This file was deleted.

Loading
Loading