thedumbtechguy.semaphore
Ansible Role: Semaphore
This Ansible role helps you install and set up Ansible Semaphore.
It includes a shell script to start the installation process and installs all necessary dependencies.
Requirements
You will need the following:
- wget: To download the
bootstrap.shscript. - thedumbtechguy.configure-ansible: For setting up Ansible. This will be installed automatically if it's not already there.
- thedumbtechguy.logrotate: For log rotation setup. This will be installed automatically if it's not already there.
- thedumbtechguy.mariadb: For setting up MariaDB. This will be installed automatically if it's not already there.
This role has been tested on
Ubuntu 16.04andUbuntu 16.10only.
Bootstrap Installation
If this is a new server, first set the hostname using: (hostname server.domain.tld).
Run the following command to start:
sudo apt-get install -y wget &&
mkdir /tmp/bootstrap &&
cd /tmp/bootstrap &&
wget https://raw.githubusercontent.com/thedumbtechguy/ansible-semaphore-bootstrap/master/bootstrap.sh &&
sudo sh bootstrap.sh init
After that, you can adjust the settings in vars.json and run sudo sh bootstrap.sh execute.
Variables
semaphore_version: The version to install.- Default:
2.3.0 - Options:
2.2.0,2.3.0
- Default:
semaphore_port: The port to use.- Default:
3000
- Default:
semaphore_db_name: The database name for Semaphore.- Default:
semaphore
- Default:
semaphore_db_auth_user: Database username for the app.- Default:
semaphore
- Default:
semaphore_db_auth_password: The password for the app's database user.- Required
semaphore_config_auth_name: The default Semaphore user name.- Default:
Admin
- Default:
semaphore_config_auth_email: The default Semaphore user email.- Default:
root
- Default:
semaphore_config_auth_username: The default Semaphore user.- Default:
admin
- Default:
semaphore_config_auth_password: The password for the default Semaphore user.- Required
semaphore_config_data_dir: Location for Semaphore config and playbook files.- Default:
/var/lib/semaphore
- Default:
semaphore_config_log_path: Location for logs.- Default:
/var/log/semaphore
- Default:
semaphore_config_email_alerts_enable: Enable email alerts.- Default:
no
- Default:
semaphore_config_telegram_alerts_enable: Enable Telegram alerts.- Default:
no
- Default:
semaphore_service_user_name: Username for the service account. Do not use root.- Default:
semaphoreNOTE: If this user does not exist, it will be created.
- Default:
semaphore_service_user_password: Password for the service account.- Required
NOTE: Omitting this allows passwordless sudo for the account.
- Required
Bootstrapping Variables
These are used only during the bootstrapping process and can be edited in the generated vars.json file.
semaphore_db_admin_home: Directory for MariaDB configuration.- Default:
/root
- Default:
semaphore_db_admin_user: Database admin username.- Default:
admin
- Default:
semaphore_db_admin_password: Database admin password.- Required
Usage Example
- hosts: all
vars:
semaphore_config_auth_email: '[email protected]'
semaphore_config_auth_password: '4dm1nPa55w0rd'
semaphore_service_user_password: '$1$ThisIsSo$RwIOJHdSWIzAJjbvBdbOZ0'
semaphore_ansible_cfg_vault_password: 'pa55w0rd'
roles:
- thedumbtechguy.semaphore
License
MIT / BSD
Author Information
This role was created by TheDumbTechGuy. Find more on Twitter, Blog, and Galaxy.
ansible-galaxy install thedumbtechguy.semaphore