commit 093a213a2940e5c005e5044bc89b4fbedc46d461 Author: Nicolas Vigier boklm@torproject.org Date: Mon Sep 4 15:37:01 2017 +0200
Bug 23384: install packages needed for building Tor Browser on build-sunet-a.torproject.net --- tools/ansible/Makefile | 2 ++ tools/ansible/README | 13 +++++++++ tools/ansible/inventory | 5 ++++ .../roles/tbb-builder/files/sudoers-tbb-build | 1 + tools/ansible/roles/tbb-builder/tasks/main.yml | 32 ++++++++++++++++++++++ tools/ansible/roles/useful-packages/tasks/main.yml | 10 +++++++ tools/ansible/tbb-build.yml | 6 ++++ 7 files changed, 69 insertions(+)
diff --git a/tools/ansible/Makefile b/tools/ansible/Makefile new file mode 100644 index 0000000..eae73b5 --- /dev/null +++ b/tools/ansible/Makefile @@ -0,0 +1,2 @@ +ansible-tbb-build: + ansible-playbook -i inventory tbb-build.yml diff --git a/tools/ansible/README b/tools/ansible/README new file mode 100644 index 0000000..f631b08 --- /dev/null +++ b/tools/ansible/README @@ -0,0 +1,13 @@ +This directory contains some ansible script that we use to setup some +machines that we use for Tor Browser development. + +To deploy some changes you need the ansible package to be installed on +your machine, and be able to log in with ssh as root on the machine(s) +where the changes need to be deployed. + +You can then use one of the following makefile targets: + +ansible-tbb-build: + Deploy changes to the machine used by Tor Browser team members to do + some Tor Browser builds. + diff --git a/tools/ansible/inventory b/tools/ansible/inventory new file mode 100644 index 0000000..e2597a0 --- /dev/null +++ b/tools/ansible/inventory @@ -0,0 +1,5 @@ +build-sunet-a ansible_ssh_user=root ansible_ssh_host=build-sunet-a.torproject.net + +[tbb-build] +build-sunet-a + diff --git a/tools/ansible/roles/tbb-builder/files/sudoers-tbb-build b/tools/ansible/roles/tbb-builder/files/sudoers-tbb-build new file mode 100644 index 0000000..5f2e48d --- /dev/null +++ b/tools/ansible/roles/tbb-builder/files/sudoers-tbb-build @@ -0,0 +1 @@ +%tbb-build ALL=(ALL) NOPASSWD: ALL diff --git a/tools/ansible/roles/tbb-builder/tasks/main.yml b/tools/ansible/roles/tbb-builder/tasks/main.yml new file mode 100644 index 0000000..2edfc18 --- /dev/null +++ b/tools/ansible/roles/tbb-builder/tasks/main.yml @@ -0,0 +1,32 @@ +--- + +- name: Install dependencies for Tor Browser build + apt: + name: "{{ item }}" + state: present + with_items: + - git + - sudo + - libyaml-libyaml-perl + - libtemplate-perl + - libio-handle-util-perl + - libio-all-perl + - libio-captureoutput-perl + - libfile-slurp-perl + - libstring-shellquote-perl + - libsort-versions-perl + - libdigest-sha-perl + - libdata-uuid-perl + - libdata-dump-perl + - libfile-copy-recursive-perl + - libgtk2.0-dev + - curl + - runc + +- name: Create the tbb-build group + group: + name: tbb-build + state: present + +- name: Give sudo access to tbb-build group members + copy: src=sudoers-tbb-build dest=/etc/sudoers.d/tbb-build owner=root group=root mode=0440 diff --git a/tools/ansible/roles/useful-packages/tasks/main.yml b/tools/ansible/roles/useful-packages/tasks/main.yml new file mode 100644 index 0000000..a15fc28 --- /dev/null +++ b/tools/ansible/roles/useful-packages/tasks/main.yml @@ -0,0 +1,10 @@ +--- + +- name: Install some useful packages + apt: + name: "{{ item }}" + state: present + with_items: + - locales + - vim-nox + - tmux diff --git a/tools/ansible/tbb-build.yml b/tools/ansible/tbb-build.yml new file mode 100644 index 0000000..dc5dfe5 --- /dev/null +++ b/tools/ansible/tbb-build.yml @@ -0,0 +1,6 @@ +--- + +- hosts: tbb-build + roles: + - role: tbb-builder + - role: useful-packages
tor-commits@lists.torproject.org