diff --git a/install_files/ansible-base/roles/tails-config/tasks/install_shell_extension.yml b/install_files/ansible-base/roles/tails-config/tasks/install_shell_extension.yml index fb5327bf5b..f3439a2e88 100644 --- a/install_files/ansible-base/roles/tails-config/tasks/install_shell_extension.yml +++ b/install_files/ansible-base/roles/tails-config/tasks/install_shell_extension.yml @@ -1,4 +1,7 @@ --- +- name: Import variables + include_vars: "group_vars/all/site-specific" + - name: Check for v3 Source Interface file stat: path: app-sourcev3-ths @@ -26,18 +29,6 @@ register: journalistv3_interface_lookup_result when: v3_source_file.stat.exists == true -- name: Look up app server hostname - command: "awk -v FS='app_hostname: ' 'NF>1{print $2}' group_vars/all/site-specific" - changed_when: false - register: app_server_lookup_result - when: site_specific_file.stat.exists == true - -- name: Look up mon server hostname - command: "awk -v FS='monitor_hostname: ' 'NF>1{print $2}' /home/amnesia/Persistent/securedrop/install_files/ansible-base/group_vars/all/site-specific" - changed_when: false - register: mon_server_lookup_result - when: site_specific_file.stat.exists == true - - name: Create the SecureDrop GNOME Shell Extension directories file: state: directory @@ -87,14 +78,6 @@ set_fact: journalist_iface: "{{ journalistv3_interface_lookup_result }}" -- name: Set the right variable for app server hostname - set_fact: - app_hostname: "{{ app_server_lookup_result }}" - -- name: Set the right variable for app server hostname - set_fact: - mon_hostname: "{{ mon_server_lookup_result }}" - - name: Assemble interface information for extension set_fact: _securedrop_extension_info: @@ -102,8 +85,6 @@ filename: extension.js source_interface_address: "{{ source_iface.stdout }}" journalist_interface_address: "{{ journalist_iface.stdout }}" - app_hostname: "{{ app_hostname.stdout }}" - mon_hostname: "{{ mon_hostname.stdout }}" - name: Create SecureDrop extension become: yes diff --git a/install_files/ansible-base/roles/tails-config/templates/extension.js.in b/install_files/ansible-base/roles/tails-config/templates/extension.js.in index 91253dd426..468317c3e3 100644 --- a/install_files/ansible-base/roles/tails-config/templates/extension.js.in +++ b/install_files/ansible-base/roles/tails-config/templates/extension.js.in @@ -19,8 +19,8 @@ const Domain = Gettext.domain(GETTEXT_DOMAIN) const source_interface_address = "{{ item.0.source_interface_address }}"; const journalist_interface_address = "{{ item.0.journalist_interface_address }}"; -const app_server_hostname = "{{ item.0.app_hostname }}"; -const mon_server_hostname = "{{ item.0.mon_hostname }}"; +const app_server_hostname = "{{ app_hostname }}"; +const mon_server_hostname = "{{ monitor_hostname }}"; const _ = Domain.gettext;