I recently discovered Ansible Semaphore and have been thoroughly impressed with its capabilities.
As someone who frequently uses Ansible to manage my servers, I was excited to find a web-based interface that
would make it even easier to manage my playbooks and inventory. Ansible is a powerful automation tool that
allows you to manage, configure, and deploy servers remotely, but it can be challenging to keep track of all
the playbooks and inventory. Ansible Semaphore aims to solve this problem by providing a web-based interface
that allows you to easily manage your playbooks and inventory.
Ansible Semaphore is an open-source project, you can find the repository on GitHub
here. It's built on top of the popular Ansible automation tool and
provides a user-friendly interface for creating and running playbooks, as well as tracking their progress and
history. The web-based interface makes it easy to create and run playbooks, regardless of your technical
ability. And, it also allows for easy management of inventory, which is a huge plus. You can easily add,
remove, and edit your inventory from the web interface, which makes it much more convenient than having to
manually edit inventory files.
The ability to view and track the progress of my playbooks in real-time is one of the major
benefits that I've found from using Ansible Semaphore. When you run a playbook, you can see the progress
in real-time, including which tasks are currently running, which have completed, and which have failed.
This allows you to quickly identify and troubleshoot any issues that may arise. Additionally, being able to
run playbooks from the web interface instead of the command line is much more convenient. You don't need to
have any technical knowledge or experience with the command line to use Ansible Semaphore. The interface is
intuitive and easy to navigate, making it simple to create and run playbooks.
Here are the steps I took to set this up:
services:
mysql:
restart: unless-stopped
ports:
- 3306:3306
image: mysql:8.0
hostname: mysql
volumes:
- semaphore-mysql:/var/lib/mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: sema # Change me if desired
MYSQL_USER: sema # Change me if desired
MYSQL_PASSWORD: changeme # Change me
semaphore:
restart: unless-stopped
ports:
- 3000:3000
image: semaphoreui/semaphore:latest
environment:
SEMAPHORE_DB_USER: sema # Change me to match MYSQL_USER
SEMAPHORE_DB_PASS: changeme # Change me to match MYSQL_PASSWORD
SEMAPHORE_DB_HOST: mysql
SEMAPHORE_DB_PORT: 3306
SEMAPHORE_DB_DIALECT: mysql
SEMAPHORE_DB: sema # Change me to match MYSQL_DATABASE
SEMAPHORE_PLAYBOOK_PATH: /tmp/semaphore/
SEMAPHORE_ADMIN_PASSWORD: adminpass # Set admin password here
SEMAPHORE_ADMIN_NAME: AdminName # Set admin username here
SEMAPHORE_ADMIN_EMAIL: [email protected] # Set admin e-mail here
SEMAPHORE_ADMIN: AdminName # Set to match SEMAPHORE_ADMIN_NAME
SEMAPHORE_ACCESS_KEY_ENCRYPTION: key # Use command `head -c32 /dev/urandom | base64` to generate this key and place it here
SEMAPHORE_LDAP_ACTIVATED: 'no'
SEMAPHORE_LDAP_HOST: dc01.local.example.com
SEMAPHORE_LDAP_PORT: '636'
SEMAPHORE_LDAP_NEEDTLS: 'yes'
SEMAPHORE_LDAP_DN_BIND: 'uid=bind_user,cn=users,cn=accounts,dc=local,dc=shiftsystems,dc=net'
SEMAPHORE_LDAP_PASSWORD: 'ldap_bind_account_password'
SEMAPHORE_LDAP_DN_SEARCH: 'dc=local,dc=example,dc=com'
SEMAPHORE_LDAP_SEARCH_FILTER: "(\u0026(uid=%s)(memberOf=cn=ipausers,cn=groups,cn=accounts,dc=local,dc=example,dc=com))"
depends_on:
- mysql
volumes:
semaphore-mysql:
3000
on my home server to port 3000
on the container. It also specifies that I'm using MySQL as the database
type and mounts a data volume to the container.
docker-compose up -d
This command starts the Ansible Semaphore container in detached mode.
http://[server-ip]:3000
on my browser.