No description
Find a file
2022-03-05 13:18:09 +01:00
defaults [TASK] Make cpu workers configurable 2020-05-19 14:48:38 +01:00
files [TASK] Add default 404 nginx server 2020-02-12 11:55:50 +01:00
handlers [FEATURE] Add fail2ban 2020-01-11 20:22:05 +01:00
meta [TASK] Init repo 2019-11-06 23:56:41 +01:00
tasks [FEATURE] Add support for multiple domains 2020-05-19 14:36:32 +01:00
templates [TASK] Install ACL + enable gzip 2022-03-05 13:18:09 +01:00
tests [TASK] Init repo 2019-11-06 23:56:41 +01:00
vars [TASK] Init repo 2019-11-06 23:56:41 +01:00
.gitignore [FEATURE] Add support for multiple domains 2020-05-19 14:36:32 +01:00
README.md [TASK] Install ACL + enable gzip 2022-03-05 13:18:09 +01:00
requirements.txt [TASK] Update version 2020-04-04 14:03:22 +01:00

Trionyx Ansible

An Ansible role to setup a complete Trionyx environment on a clean Ubuntu 18.04 server.

Setup an Ansible project that uses this role with:

trionyx create_ansible <domain> <repo>

Setup your host


    cat >setup.sh <<EOL
    #!/usr/bin/env bash
    
    useradd -m -s /bin/bash ansible
    echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/99-ansible
    mkdir /home/ansible/.ssh/
    chmod 700 /home/ansible/.ssh/
    touch /home/ansible/.ssh/authorized_keys
    
    read -p 'Ansible public ssh key: ' ansible_public_key
    echo \$ansible_public_key > /home/ansible/.ssh/authorized_keys
    
    chmod 600 /home/ansible/.ssh/authorized_keys
    chown ansible -Rf /home/ansible/.ssh
    
    sudo apt-get update
    sudo apt-get --assume-yes install python3 python3-pip  acl
    
    echo "Change SSH port to 6969 and restart ssh"
    sudo sed -i "s/#Port 22/Port 6969/" /etc/ssh/sshd_config
    sudo sed -i -r 's/#?PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config
    sudo sed -i -r 's/#?PermitEmptyPasswords.*/PermitEmptyPasswords no/' /etc/ssh/sshd_config
    sudo systemctl restart sshd
    EOL
    chmod +x setup.sh
    . setup.sh