Git Product home page Git Product logo

ansible_playbook-baseline-online-server's Introduction

Base Service Configuration

Github Project Stars Travis CI build status Documentation Status Github Issue Tracking Github LatestRelease

This Repository will be handle the base configuration of Public Services, like Minecraft Server or Personal S3 Storage, a try dont get any Snowflake Server. Mostly hosted at hetzner.cloud, and created with Terraform.

Features

  • harder sshd
    • configure fail2ban
  • install restic
  • base logrotate configuration
  • install python3
  • configure system ntp for time handling
  • configure docker (optional)
  • Security Scans
    • execute open-scap-scan
    • root kit analyse with rkhunter
    • configure aide (planed)

Supported Distributions

Distribution Molecule tested Packer Vagrant Boxed Description
Fedora
RockyOS
Ubuntu 20.04
Alpine (planed)

Out of Scope

Usage

Prepare Python Env

virtualenv -p python3 ~/venvs/develop-ansible_role-vagrant
source ~/venvs/develop-ansible_role-vagrant/bin/activate
pip install -r requirements.txt
pre-commit install
ansible-galaxy install -r requirements.yml

Start SSH Agent

pass private/keyfiles/ssh/ansible_rollout/passphrase -c
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/ansible_id_ed25519

Playbooks

playbook ansible_group description
master-configure-system.yml master playbook for combine the base and docker playbook.
playbook-base-configureation.yml all Configure the base system.
playbook-docker-configureation.yml dockerbased Prepare the System for docker Usage
export ANSIBLE_INVENTORY=$(pwd)/prod
export HCLOUD_TOKEN=$(pass .../token)

ansible-playbook master-configure-system.yml

Development

For Locally automatical testing we use a Combination of Molecule and Vagrant

virtualenv -p python3 ~/venvs/ansible-vagrant/
source ~/venvs/ansible-vagrant/bin/activate
pip install -r requirements.txt
pre-commit install

Testing

running the tests:

molecule test

Infrastructure Tests

pytest --connection=ansible --hosts=all test/*

Reusing and Sharing

For reusing and sharing you can create own vagrant box with the Packer /packer.

First Build the CentOS Base (WIP)

Releasing

Must be executed from the develop branch.

pre-commit uninstall \
    && bump2version --tag release --commit \
    && git checkout master && git merge develop && git checkout develop \
    && bump2version --no-tag patch --commit \
    && git push origin master --tags \
    && git push origin develop \
    && pre-commit install

Setup Local Env

asdf plugin-add packer https://github.com/Banno/asdf-hashicorp.git
asdf plugin-add terraform https://github.com/Banno/asdf-hashicorp.git
asdf plugin-add python
asdf plugin-test act https://github.com/grimoh/asdf-act --asdf-tool-version latest
python -m venv env
source env/bin/activate
pip install -r requirements.txt

ansible_playbook-baseline-online-server's People

Contributors

dependabot[bot] avatar nolte avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jsaidi

ansible_playbook-baseline-online-server's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update Terraform archive to ~> 2.4.0
  • Update Terraform null to ~> 3.2.0
  • Update dependency python to v3.12.4
  • Update dependency sphinx_rtd_theme to v1.3.0
  • Update dependency sphinxcontrib-plantuml to v0.30
  • Update dependency terraform to v1.9.0
  • Update pre-commit hook adrienverge/yamllint to v1.35.1
  • Update dependency ansible-lint to v24
  • Update dependency molecule to v24
  • Update dependency molecule-vagrant to v2
  • Update dependency pre-commit to v3
  • Update dependency sphinx to v7
  • Update dependency sphinx_rtd_theme to v2
  • Update pre-commit hook ansible/ansible-lint to v24
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Warning

Renovate failed to look up the following dependencies: Failed to look up gitlab-tags package pycqa/flake8.

Files affected: .pre-commit-config.yaml


Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

ansible-galaxy
ansible/roles/requirements.yml
asdf
.tool-versions
  • terraform 1.1.4
  • python 3.8.5
  • act 0.2.17
docker-compose
.devcontainer/docker-compose.yml
dockerfile
.devcontainer/Dockerfile
github-actions
.github/workflows/build-static-tests.yaml
  • nolte/gh-plumbing v1.0.11
  • nolte/gh-plumbing v1.0.11
  • nolte/gh-plumbing v1.0.11
.github/workflows/release-cd-deliver-docs.yml
  • nolte/gh-plumbing v1.0.11
.github/workflows/release-cd-refresh-master.yml
  • nolte/gh-plumbing v1.0.11
.github/workflows/release-drafter.yml
  • nolte/gh-plumbing v1.0.11
pip_requirements
requirements.txt
  • ansible-lint ==6.0.2
  • ansible ==5.6.0
  • bump2version ==1.0.1
  • molecule-vagrant ==1.0.0
  • molecule ==3.6.1
  • paramiko ==2.10.3
  • pre-commit ==2.18.1
  • python-vagrant ==1.0.0
requirementsDocs.txt
  • sphinx ==4.5.0
  • sphinxcontrib-plantuml ==0.23
  • sphinxcontrib-ansibleautodoc ==0.0.5
  • sphinx_rtd_theme ==1.0.0
  • PyYAML ==6.0
  • m2r2 ==0.3.2
pre-commit
.pre-commit-config.yaml
  • pre-commit/pre-commit-hooks v4.2.0
  • pycqa/flake8 4.0.1
  • adrienverge/yamllint v1.26.3
  • pre-commit/mirrors-isort v5.10.1
  • ansible/ansible-lint v6.0.2
  • antonbabenko/pre-commit-terraform v1.67.0
terraform
terraform/configure/main.tf
terraform/configure/versions.tf
  • archive ~> 2.2.0
  • null ~> 3.1.0
  • random ~> 3.1.0
  • hashicorp/terraform >= 1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.