Skip to content
Ansible modules for Samson
Python Shell HCL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
library
meta
module_utils
molecule
.gitignore
.pylintrc
.travis.yml
.yamllint
Dockerfile.test
LICENSE
README.md
bootstrap_test_db.sh

README.md

Ansible modules for Samson

Build Status

This role contains modules to simplify working with Samson.

It supports:

  • environments
  • deploy groups
  • projects
  • stages
  • commands

Installation

ansible-galaxy install danihodovic.samson

Example Playbook

---
- name: Samson
  hosts: localhost
  roles:
    - danihodovic.samson
  vars:
    samson_url: https://samson.mycompany.org
    # Hide this in the Ansible vault or pass it through the environment instead
    # of checking it in as plaintext
    samson_token: 967c19e2e223682d232935661f0675b0ddd4930f9e77ce32cad51bc65b24bbbc
  tasks:
    - name: Create dotfiles project
      register: project
      samson_project:
        url: '{{ samson_url }}'
        token: '{{ samson_token }}'
        permalink: dotfiles
        name: dotfiles
        repository_url: https://github.com/danihodovic/.dotfiles

    - name: Create deployment command
      register: command
      samson_command:
        url: '{{ samson_url }}'
        token: '{{ samson_token }}'
        project_id: '{{ project.project.id }}'
        command: |
          echo "deploying my project!"

    - name: Create staging
      samson_stage:
        url: '{{ samson_url }}'
        token: '{{ samson_token }}'
        name: staging
        permalink: staging
        project_permalink: '{{ project.project.permalink }}'
        command_ids:
          - '{{ command.command.id }}'

License

MIT

Author Information

This role is created and maintained by Dani Hodovic.

You can’t perform that action at this time.