Skip to content

Ansible Semaphore

https://ansible-semaphore.com/

Ansible-Semaphore is a UI interface for ansible playbooks.

Setup

Setup MySQL

Here we use semaphore as the password.

docker run -d --name=mysql -p 127.0.0.1:3306:3306 -e MYSQL_ROOT_PASSWORD=semaphore mysql:5.6

Run

docker inspect mysql | grep -w -m1 IPAddress

Output

"IPAddress": "172.17.0.2",

Setup Semaphore

Pull and start the container

docker run \
    --name semaphore \
    --rm -it \
    -p 8080:3000 \
    ansiblesemaphore/semaphore:v2.6.9 sh

Inside the container, run

semaphore -setup
Field Value
DB Host 172.17.0.2:3306
DB Password semaphore

Follow the guide and setup the username and password:

Output

> Config output directory (default /etc/semaphore): /home/semaphore
Running: mkdir -p /home/semaphore..
Configuration written to /home/semaphore/config.json..
Pinging db..

Running DB Migrations..
Checking DB migrations


> Username: admin
> Email: admin@admin
WARN[0030] sql: no rows in result set                    level=Warn
> Your name: admin
> Password: admin

You are all setup admin!
Re-launch this program pointing to the configuration file

./semaphore -config /home/semaphore/config.json

To run as daemon:

nohup ./semaphore -config /home/semaphore/config.json &

You can login with admin@admin or admin.