Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

StationMaster-ansible

Ansible playbook to support https://github.com/radify/stationmaster. Takes care of updating StationMaster's CSV

What does it do?

StationMaster-ansible writes to stationmaster.csv - it can add and remove sites from StationMaster. You can include it into your playbook to automatically keep StationMaster up to date!

Requirements

Role variables

  • base - the base path you want to deploy this index to. e.g. '/opt/company/company-ui'
  • devdomain - the domain that your development workspaces are on.
  • branch - the branch that you are telling Stationmaster about

Dependencies

None

Boundaries

All StationMaster-ansible does is:

  1. Check out StationMaster to base
  2. Add and remove lines from StationMaster's data CSV.

So, this means that it's your responsibility to do things like:

  • Set up the nginx or apache files to serve StationMaster
  • Restart your web server
  • Manage your domains, etc

Instructions

Installing StationMaster through Ansible Galaxy

ansible-galaxy install radify.stationmaster

Example Playbook

Then, from within one of your playbooks, you could do something like creating a playbook stationmaster.yaml and using the add action:

---
- hosts: all
  roles:
  - { role: radify.stationmaster, base: "/opt/stationmaster", devdomain: dev.company.com, branch: branch, protocol: 'https', action: 'add' }

Then you can do something like:

ansible-playbook -i path/to/custom-inventory stationmaster.yaml

Removing is symmetrical using the remove action:

---
- hosts: all
  sudo: yes
  roles:
    - { role: stationmaster, action: 'remove', branch: branch }

Without using Ansible Galaxy

You can also check out stationmaster-ansible to a directory and include it. If you don't want to use Ansible Galaxy for some reason, you can clone this repository and use an include statement from within a task. See the notes on CONTRIBUTING.md for details.

Adding via StationMaster

Here's an example of checking out StationMaster to /opt/stationmaster and adding a branch to it:

- include: /private/var/www/stationmaster-ansible/tasks/main.yml base=/opt/stationmaster devdomain=dev.company.com branch={{branch}} protocol='https' action=add

Removing via StationMaster

This is symmetrical to the adding:

- include: /private/var/www/stationmaster-ansible/tasks/remove.yml base=/opt/stationmaster devdomain=dev.company.com branch={{branch}} protocol='https' action=remove

About

Ansible Galaxy plugin for StationMaster

Resources

License

Packages

No packages published