🏃 Disable Code Server runbook

This runbook provides step-by-step instructions to stop and disable Code Server using Ansible.


1️⃣ Login to an Ansible Control Node

Start by logging into an Ansible control node and prepare the environment:

cd ~/ansible
source /opt/python_3.12/bin/activate
INV=inventory/ansible/inventory.ini

⚡ Important: Always begin on the control node so all commands run in the correct environment.


2️⃣ Pull the Latest Code

Ensure your local Ansible repository is up to date:

git pull origin main

⚡ Important: Pulling the latest code first prevents conflicts and ensures you’re working with the most recent configuration.


3️⃣ Run the Ansible Playbook

Run the Ansible playbook to stop and disable Code Server version:

ansible-playbook -i $INV -k playbooks/disable_code_server.yml

⚡ Note: The -k option will prompt for an SSH password if required.


6️⃣ Verify Code Server is Disabled

Verify that Code Server is not available.

  1. Open a web browser and navigate to: https://code.refol.us/
  2. A 502 Bad Gateway should be what is shown.

✅ Notes