forked from SatelliteQE/broker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated broker to be compatible with dynaconf 3.0.0
+ Added the ability to specify a BROKER_DIRECTORY envrionment variable + Changed settings.yaml to broker_settings.yaml
- Loading branch information
1 parent
3f9b2d8
commit 5cf4f23
Showing
14 changed files
with
71 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,5 +94,5 @@ ENV/ | |
.pytest_cache/ | ||
|
||
# project | ||
settings.yaml | ||
*settings.yaml | ||
inventory.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import os | ||
from pathlib import Path | ||
from dynaconf import Dynaconf | ||
|
||
settings_file = "broker_settings.yaml" | ||
BROKER_DIRECTORY = Path() | ||
|
||
if "BROKER_DIRECTORY" in os.environ: | ||
envar_location = Path(os.environ["BROKER_DIRECTORY"]) | ||
if envar_location.is_dir(): | ||
BROKER_DIRECTORY = envar_location | ||
|
||
settings = Dynaconf(settings_file=str(BROKER_DIRECTORY.joinpath("broker_settings.yaml"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Broker settings | ||
debug: False | ||
inventory_file: "inventory.yaml" | ||
# Host Settings | ||
host_username: "root" | ||
host_password: "<password>" | ||
# Provider settings | ||
AnsibleTower: | ||
base_url: "https://<ansible tower host>/" | ||
username: "<username>" | ||
password: "<plain text password>" | ||
release_workflow: "remove-vm" | ||
TestProvider: | ||
config_value: "something" | ||
# You can set a nickname as a shortcut for arguments | ||
nicks: | ||
rhel7: | ||
workflow: "deploy-base-rhel" | ||
rhel_version: "7.7" | ||
provider: "RHEV" | ||
notes: "Requested by broker" | ||
test_nick: | ||
test_action: "fake" | ||
arg1: "abc" | ||
arg2: 123 | ||
arg3: True |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters