This is a simple project designed as a Proof of Concept (PoC) for using Semaphore with Ansible.
Before getting started, make sure you have:
- Docker installed
- Docker Compose installed
- Git installed
- Access to this repository
Clone the project and create a directory where Semaphore will store its data:
git clone https://github.com/douglastos/Semaphore.git
cd Semaphore
mkdir semaphore_dataStart the project using:
docker compose up -d
⚠️ Note: If you're using an older version, usedocker-compose up -d.
You should see an output similar to:
[+] Running 11/11
✔ semaphore Pulled 21.5s
...
✔ Container semaphore StartedAccess Semaphore at: http://localhost:3000
You should see the login screen:
Login using the default user:
- Username:
admin - Password:
admin
On the next screen, create a new project — you can separate them by client or environment if needed.
We'll now generate an SSH key to allow Semaphore to connect to the target server.
Access the container shell:
docker container exec -it semaphore bashThen run the following commands inside the container:
ssh-keygen -t rsa -b 4096 -C "semaphore@yourproject" -f ~/.ssh/semaphore
ssh-copy-id -i ~/.ssh/semaphore.pub deploy@<your_server_ip>Sample output:
...
Number of key(s) added: 1
Now try logging into the machine with:
"ssh -i /home/semaphore/.ssh/semaphore deploy@10.110.1.52"Now back in the Semaphore web UI, configure the following items in order:
- Key Store
- Repositories
- Variable Groups
- Inventory
- Task Templates
Copy the private key from the container:
cat /home/semaphore/.ssh/semaphorePaste the contents into the "Key Store" section:
Add your Git repository:
Create environment variables as needed:
Set up the target servers or environments:
Create a playbook task template:
Then, run it:
You now have a running Semaphore + Ansible environment ready for automation and testing.









