So I’ve been scratching my head for two days trying to get my own lemmy server up and running.

I have limited server hosting experience but I used to design html websites back in high school through wordpress and was able to successfully set up my own mastadon instance so I’m pretty decent at following instructions, but what keeps tripping me up is ansible and how the heck it works.

The instructions (https://github.com/LemmyNet/lemmy-ansible) are telling me to install ansible on my local machine using python3. On my windows machine I installed ansible using python but when i type the ansible command into terminal it gives me no command found. Is linux required as a host machine?

I have an account over at digitalocean and I’m willing to host my own ubuntu machine over there to get my instance running but I cannot for the life of me figure out how ansible is supposed to set up a server on my windows machine. ANY help would be GREATLY appreciated… I’m tearing my hair out and feel incredibly stupid right now :D

  • Freeman@lemmy.pub
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    On my windows machine I installed ansible using python but when i type the ansible command into terminal it gives me no command found. Is linux required as a host machine?

    Its possible the installer didnt properly add the ansible exectuable to the PATH environment variable. You can do this manually, or just use the command prompt and cd to the directory that ansible is installed.

    You can do a search of “environment” and edit the variables yourself. It does require a reboot to take effect.

    System>Path is what you want to set. And no matter what you need to know where the ansible installer is.

    Personally I used an exsiting linux box in my lab. If i didnt have that, then maybe the windows subsystem for linux would be my next step. I would avoid python/ansible in windows if i could.

    Additionally you COULD just install ansible on the local VPS. You basically just set the localhost to be the destination in the hosts config.

    Something like this

    https://gist.github.com/alces/caa3e7e5f46f9595f715f0f55eef65c1

    https://www.ntweekly.com/2021/03/30/run-ansible-playbooks-on-your-localhost-machine/

    I would also do some basic lockdown of the machine. Set SSH to key based auth only. Setup the firewall and block all ports other than 80/443 and limit 22 to your home IP or something. Limit SSH access to only an account or group etc etc.