Skip to content

Commit

Permalink
Merge pull request #4169 from freedomofpress/4162-validate-tor-version
Browse files Browse the repository at this point in the history
Ensure version of tor installed is from FPF repo
  • Loading branch information
kushaldas authored Feb 22, 2019
2 parents cb91e59 + 2ef9dd1 commit 9e855bf
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@
apt-cache policy tor | sed -e 's/^\s*Installed:\ \(\S*\)/\1/g;tx;d;:x'
changed_when: false
register: extract_tor_version
when: "'amazon' in ansible_product_version"

# Ubuntu upstream repositories serve a version of tor that is very old. Since
# FPF apt servers host this same package, let's ensure that the FPF-provided
# Tor package is installed by checking we are using a recent version.

- name: Ensure correct Tor version installed.
assert:
that: extract_tor_version.stdout is version('0.3.4.9', '>=')
fail_msg: "Tor package was not found on FPF apt server."

- name: Dump Tor version to file (for reporting)
copy:
Expand Down

0 comments on commit 9e855bf

Please sign in to comment.