-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply conditional logic for yum repo
rely on config.json instead of env vars. We can rely on env vars as jinja templates are evaluated before runtime (https://docs.saltstack.com/en/latest/topics/jinja/index.html) Adds production SD release signing key Necessary for the prod logic. We don't have packages hosted in these prod URLs yet. Adds validate check for target config item Determines the "environment", e.g. dev/prod
- Loading branch information
Showing
6 changed files
with
79 additions
and
23 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
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 |
---|---|---|
@@ -1,23 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: set syntax=yaml ts=2 sw=2 sts=2 et : | ||
|
||
# DEBUGGING | ||
{% set sd_env = salt['environ.get']('SECUREDROP_ENV', default='dev') %} | ||
# See references: | ||
# | ||
# - https://docs.saltstack.com/en/latest/topics/tutorials/states_pt3.html | ||
# | ||
|
||
|
||
# Example loading taking from Qubes /srv/salt/top.sls | ||
|
||
{% load_yaml as sdvars_defaults %} | ||
{% include "sd-default-config.yml" %} | ||
{% endload %} | ||
|
||
{% import_json "sd/config.json" as d %} | ||
|
||
{% if sd_env == "prod" %} | ||
{% set sdvars = sdvars_defaults['prod'] %} | ||
{% if d.target == "dev" %} | ||
{% set sdvars = sdvars_defaults['dev'] %} | ||
{% else %} | ||
{% set sdvars = sdvars_defaults['dev'] %} | ||
{% set sdvars = sdvars_defaults['prod'] %} | ||
{% endif %} |
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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
--- | ||
securedrop_defaults: | ||
prod: | ||
dom0_yum_repo_url: "https://yum.securedrop.org/workstation/dom0/f25" | ||
apt_repo_url: "https://apt.freedom.press" | ||
signing_key_filename: "securedrop-release-signing-pubkey.asc" | ||
dev: | ||
dom0_yum_repo_url: "https://yum-test.securedrop.org/workstation/dom0/f25" | ||
apt_repo_url: "https://apt-test-qubes.freedom.press" | ||
signing_key_filename: "apt-test-pubkey.asc" | ||
prod: | ||
dom0_yum_repo_url: "https://yum.securedrop.org/workstation/dom0/f25" | ||
apt_repo_url: "https://apt.freedom.press" | ||
signing_key_filename: "securedrop-release-signing-pubkey.asc" | ||
dev: | ||
dom0_yum_repo_url: "https://yum-test.securedrop.org/workstation/dom0/f25" | ||
apt_repo_url: "https://apt-test-qubes.freedom.press" | ||
signing_key_filename: "apt-test-pubkey.asc" |
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,43 @@ | ||
-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
|
||
mQINBFgIrN8BEACnXQFtRVzlePZL/4wfdsAI0FohKj+v17c9U/JNOOwax2DapJe+ | ||
pQ7jZ8G2kUDLTNTMgZLze/gmOJF28olplMi9sLwBynKbN2xOq6MybxE9NLLeE7/y | ||
ZfMZrgMSwgHW40udRZEEpe9IYKZP2QXLGFOmRiqiQ0HNp9WKFNTfi03Yx3XEUeeZ | ||
kap9i0+1sktYBrlnUzXUTJHiUjJTEiI9NX23Vey0NtaveJLzdEQmsYQWaMbX4ECD | ||
Hz+UNRNrjXv303bJgSGBm53tsvQzd6Lyzk4RGOK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