olegdayo / ansible-playground

Doing some Ansible stuff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible playground

About

This repo is dedicated to Ansible HW

Prerequisites

Let's assume we have 3 servers with different operating systems:

  • Alpine (SSH over user/password connection)
  • Debian (SSH over RSA keys connection)
  • NetBSD (SSH over user/password connection)

And we are to create IaC with Ansible to easily deploy FreeLABorga application on all our machines

Project structure

.
├── README.md
├── README.pdf
├── src
│   ├── host_vars - the secrets are stored here
│   ├── inventory.yaml - hosts connection description
│   └── playbook.yaml - application installation and run scripts
└── templates
    └── freelaborga.service.j2 - systemd template

Run scripts

Before running the scripts be sure to prepare configs in host_vars:

  • Create alpine.yaml, debian.yaml and net_bsd.yaml
  • Fill the configs according to examples

When configs are ready - run the following command:

ansible-playbook -i src/inventory.yaml src/playbook.yaml

Infrastructure completeness

  • Alpine
    • Ping
    • Dependencies installation
    • Project installation
    • Project run
  • Debian
    • Ping
    • Dependencies installation
    • Project installation
    • Project run
  • NetBSD
    • Ping
    • Dependencies installation
    • Project installation
    • Project run

About

Doing some Ansible stuff


Languages

Language:Jinja 100.0%