phaustin / ansible_intro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction to ansible

This repository contains a set of ansible playbooks that builds a docker-powered conda environment and runs a plotly dash server over https using letsencrypt.

Prerequisites

  • An Ubuntu 20.04 droplet on Digital Ocean (Regular, 2 Gbytes Ram, 50 Gbyte SSD, $US 0.015/hour)
  • A domain name managed by Digital Ocean ($1/12 months at https://www.namecheap.com/ )
  • A Digital Ocean Personal Access api token

File edits

Execute the playbooks

Notes

ansible adhoc command

check hosts.yml entry

  • ansible -i hosts.yml -u root do1x -m ping

Test shell echo

  • ansible-playbook -i hosts.yml -u jovyan -l do1x test_ansible.yml

Encryption

https://www.digitalocean.com/community/tutorials/how-to-use-vault-to-protect-sensitive-ansible-data#using-ansible-vault-with-a-password-file

echo 'my_vault_password' > ~/.vault_pass

ansible-config init --disabled -t all > ~/.ansible.cfg

ansible-vault encrypt --encrypt-vault-id traefik vault.yml

Configuration

Plotly dashbooard:

About


Languages

Language:Jinja 49.4%Language:Python 30.1%Language:Dockerfile 19.3%Language:Shell 1.1%