

We use Ansible to run screen -ls, this gives us the active screen sessions and we store it into a sessions register. We don’t want to try to start the server every time we run the playbook, so we need to make a check if there is an active Screen session. You should see something like this: # ansible mcservers -m ping 192.168.1.XXX | SUCCESS => ' when: (session_name) = -1 Next, test if your Ansible host can login and interact properly with your CentOS server. Setupįirst off, add your server’s IP to the file /etc/ansible/hosts under the group mcservers it should look something like this: # /etc/ansible/hosts 192.168.1.XXX I currently have a local server that I use for this example but feel free to use any VPS solution like AWS, DigitalOcean, Azure, etc. SSH keys passed from the Ansible host to the CentOS server.A server running CentOS 7 with root access.We will talk about the pros/cons at the end. This is different from other configuration tools as they utilize a master-agent based communication. From what I’ve read, the pros of using Ansible is that it uses a SSH based connection without the need of a remote agent. This guide is a walkthrough on how I approached setting up a Minecraft server with Ansible. Deploying a Minecraft 1.12.1 server with Ansible and CentOS 7
