Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated restore playbook to only compare tor configs when configs are being updated. #5834

Merged
merged 3 commits into from
Mar 4, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
updated v2 services removal condition
  • Loading branch information
zenmonkeykstop committed Mar 4, 2021
commit f2b9f41aa444a5f0c109a7201f7459b0c6c42517
14 changes: 7 additions & 7 deletions install_files/ansible-base/roles/restore/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,47 +99,47 @@
copy:
src: "{{ role_path }}/files/disable_v2.py"
dest: /opt/disable_v2.py
when: (not restore_skip_tor) or
when: (not restore_skip_tor) and
("V3 services only" in compare_result.stdout)

- name: Execute disable_v2 script
command: python3 /opt/disable_v2.py /etc/tor/torrc /etc/tor/torrc
when: (not restore_skip_tor) or
when: (not restore_skip_tor) and
("V3 services only" in compare_result.stdout)

- name: Remove v2 tor source directory
file:
state: absent
path: /var/lib/tor/services/source
when: (not restore_skip_tor) or
when: (not restore_skip_tor) and
("V3 services only" in compare_result.stdout)

- name: Remove v2 tor journalist directory
file:
state: absent
path: /var/lib/tor/services/journalist
when: (not restore_skip_tor) or
when: (not restore_skip_tor) and
("V3 services only" in compare_result.stdout)

- name: Remove v2 tor ssh directory
file:
state: absent
path: /var/lib/tor/services/ssh
when: (not restore_skip_tor) or
when: (not restore_skip_tor) and
("V3 services only" in compare_result.stdout)

- name: Remove v2 source_url application file
file:
state: absent
path: /var/lib/securedrop/source_v2_url
when: (not restore_skip_tor) or
when: (not restore_skip_tor) and
("V3 services only" in compare_result.stdout)

- name: Remove disable_v2.py script
file:
state: absent
path: /opt/disable_v2.py
when: (not restore_skip_tor) or
when: (not restore_skip_tor) and
("V3 services only" in compare_result.stdout)

- name: Reload Tor service
Expand Down