bitovi / bitovi/bitops

Multiple Operations On the Same Bitops environment

Open
#86 1 comment 0 reactions 0 assignees View on GitHub
enhancement ✨
Dominant language
Python
Stars
37
Forks
9
PR merge metrics
No merged PRs in 30d

Description

from @ConnorGraham
---
**Background**
I have a use-case where my ansible playbook handles different operations (`beta-create`, `beta-promote`, `beta-destroy`), depending on the lifecycle of a single CI build.

This is handled through ansible using [tags](https://docs.ansible.com/ansible/latest/user_guide/playbooks_tags.html). The tags I want to run is controlled with the cli argument `--tags` or the environment variable `TAGS_RUN`. Passing the cli argument via `bitops.config.yml` statically won't work because I need to dynamically change the tags depending on the operation I need to run. Passing the `TAGS_RUN` env var in to the bitops docker image works in this one case, but the tool bitops uses may not always contain such clean parity between cli args and env vars.

**Potential Solutions**

1. Multiple Environments + Improved Default env merging
I could put all my common ansible code in to the bitops `default` environment and create a separate environment for each operations that only contains `bitops.config.yml` within the `ansible/` directory

2. Multiple `bitops.config.yml` within a single environment
Allow the `bitops.config.yml` location to be overwritten with an environment variable

3. Before hook to modify `bitops.config.yml`
Implement a bitops before hook to modify `bitops.config.yml` at runtime

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.