Giter Club home page Giter Club logo

ansible-atlantis's Introduction

Ansible Atlantis Role

A role to install and configure Atlantis.

Requirements

  • Docker and Docker Compose

Role Variables

  • atlantis_docker_tag: The Docker tag that should be used (Optional).
  • atlantis_server_port: Atlantis server port (Optional).
  • atlantis_env_file: The name of the Atlantis environment template file (Optional). This file contains all environment variables for Atlantis and Terraform.

Environment variables

Some configurations are required by Atlantis to be passed using environment variables. Some of these required variables are ATLANTIS_ATLANTIS_URL and ATLANTIS_REPO_ALLOWLIST.

In addition, you also have to provide the configuration and credentails for your desired Git host. Please take a look at the documentation for further details:

Last, configure the provider credentials so Atlantis can actually run Terraform commands.

An example of such an environment variable file could be:

ATLANTIS_ATLANTIS_URL={{ atlantis['url'] }}
ATLANTIS_REPO_ALLOWLIST={{ atlantis['allowed_repos'] }}
ATLANTIS_REPO_CONFIG_JSON={"repos":[{"id":"/.*/","apply_requirements":["approved","mergeable"],"allowed_overrides":["apply_requirements","workflow","delete_source_branch_on_merge"],"allow_custom_workflows":true,"delete_source_branch_on_merge":true}]}

ATLANTIS_GH_USER={{ atlantis['github']['user'] }}
ATLANTIS_GH_TOKEN={{ atlantis['github']['token'] }}
ATLANTIS_GH_WEBHOOK_SECRET={{ atlantis['github']['webhook_secret'] }}

DIGITALOCEAN_TOKEN={{ atlantis['digitalocean']['api_key'] }}
AWS_ACCESS_KEY_ID={{ atlantis['terraform']['aws']['access_key_id'] }}
AWS_SECRET_ACCESS_KEY={{ atlantis['terraform']['aws']['secret_access_key'] }}

The variables within the brackets are Ansible variables. You could store these secrets for example using Ansible Vault.

Example Playbook

- hosts: all
  tasks:
    - ansible.builtin.include_role:
        name: ansible-atlantis
      vars:
        atlantis_docker_tag: v0.27.1
        atlantis_server_port: 4141
        atlantis_env_file: atlantis_env.j2

Versioning

In order to have a verioning in place and working, create leightweight tags that point to the appropriate minor release versions.

Creating a new minor release:

git tag v2
git push --tags

Replacing an already existing minor release:

git tag -d v2
git push origin :refs/tags/v2
git tag v2
git push --tags

ansible-atlantis's People

Contributors

alexlanz avatar stplasim avatar

Stargazers

 avatar  avatar

Forkers

melwafi-youcan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.