Skip to content

Commit

Permalink
Removes dev-only blocks from clean-all state
Browse files Browse the repository at this point in the history
Now we use the RPM to manage presence/absence of all scripts and
configs, Salt or otherwise. So we don't want to double-remove the files,
we'll trust the "dnf remove" action to handle it, regardless of
environment (dev, staging, or prod).
  • Loading branch information
Conor Schaefer committed Jul 10, 2020
1 parent fda1be4 commit 945caa8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
16 changes: 0 additions & 16 deletions dom0/sd-clean-all.sls
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,6 @@ remove-rpc-policy-tags:
cmd.script:
- name: salt://remove-tags

# Removes files that are provisioned by the dom0 RPM, only for the development
# environment, since dnf takes care of those provisioned in the RPM
{% if d.environment == "dev" %}
remove-dom0-sdw-config-files-dev:
file.absent:
- names:
- /opt/securedrop
- /srv/salt/remove-tags
- /srv/salt/securedrop-update
- /srv/salt/update-xfce-settings
# Do not remove these scripts before they have done their cleanup duties
- require:
- cmd: dom0-reset-icon-size-xfce
- cmd: remove-rpc-policy-tags
{% endif %}

sd-cleanup-etc-changes:
file.replace:
- names:
Expand Down
10 changes: 1 addition & 9 deletions dom0/sd-dom0-files.sls
Original file line number Diff line number Diff line change
Expand Up @@ -198,21 +198,13 @@ dom0-securedrop-launcher-desktop-shortcut:
- mode: 755

{% import_json "sd/config.json" as d %}
{% if d.environment == "dev" %}
dom0-remove-securedrop-workstation-dom0-config:
pkg.removed:
- pkgs:
- securedrop-workstation-dom0-config

{% else %}

{% if d.environment != "dev" %}
dom0-install-securedrop-workstation-dom0-config:
pkg.installed:
- pkgs:
- securedrop-workstation-dom0-config
- require:
- file: dom0-workstation-rpm-repo

{% endif %}

# Hide suspend/hibernate options in menus in prod systems
Expand Down

0 comments on commit 945caa8

Please sign in to comment.