Commit ef9b318f authored by Ana Custura's avatar Ana Custura
Browse files

Better task naming

parent 33f4fe96
Loading
Loading
Loading
Loading
+21 −20
Original line number Diff line number Diff line
---
- name: Forward port 443 to 8080
- name: Set up port forwarding
  ansible.builtin.iptables:
    table: nat
    chain: PREROUTING
@@ -25,7 +25,7 @@
  apt: update_cache=yes
  become: yes

- name: install dependencies
- name: Install system dependencies
  apt:
    name: "{{ packages }}"
    update_cache: yes
@@ -49,7 +49,7 @@
    - virtualenv
  become: true

- name: create cloud user
- name: Create cloud user
  user:
    name: cloud
    state: present
@@ -58,7 +58,7 @@
    home: /home/cloud/
  become: true

- name: set up authorized keys
- name: Set up authorized keys
  authorized_key:
    user: cloud
    state: present
@@ -67,7 +67,7 @@
  with_items: ['acute']
  become: true

- name: allow cloud to run sudo commands
- name: Allow cloud to run sudo commands
  lineinfile:
    path: /etc/sudoers
    state: present
@@ -75,20 +75,20 @@
    line: '%cloud ALL=(ALL) NOPASSWD: ALL'
    validate: '/usr/sbin/visudo -cf %s'

- name: clone onionperf repository
- name: Clone onionperf repository
  git:
    repo: "{{ op_repo }}"
    version: "{{ op_tag }}"
    dest: /home/cloud/onionperf
  register: oprepo

- name: Install requirements
- name: Install onionperf requirements
  pip:
    virtualenv: /home/cloud/venv
    virtualenv_python: python3.7
    requirements: /home/cloud/onionperf/requirements.txt

- name: build and install onionperf
- name: Build and install onionperf
  shell: "{{ item }} chdir=/home/cloud/onionperf"
  with_items:
    - source /home/cloud/venv/bin/activate . && python3 setup.py install
@@ -96,13 +96,14 @@
     executable: /bin/bash
  when: oprepo.changed

- name: clone tgen repository
- name: Clone tgen repository
  git:
    repo: 'https://github.com/shadow/tgen.git'
    repo: "https://github.com/shadow/tgen.git"
    version: "master"
    dest: /home/cloud/tgen
  register: tgenrepo

- name: create tgen build dir
- name: Create tgen build directory
  file:
    state: directory
    path: /home/cloud/tgen/build
@@ -113,21 +114,21 @@
    - make
  when: tgenrepo.changed

- name: install tgen
- name: Install tgen in the virtual environment
  file:
    src: "/home/cloud/tgen/build/src/tgen"
    dest: "/home/cloud/venv/bin/tgen"
    state: link
  when: tgenrepo.changed

- name: clone tor repository
- name: Clone tor repository
  git:
    repo: "{{ tor_repo }}"
    version: "{{ tor_tag }}"
    dest: /home/cloud/tor/
  register: torrepo

- name: build tor
- name: Build tor and install
  command: "{{ item }} chdir=/home/cloud/tor"
  with_items:
    - sh autogen.sh
@@ -136,21 +137,21 @@
    - make install
  when: torrepo.changed

- name: install tor
- name: Install tor in the virtual environment
  file:
    src: "/home/cloud/tor/src/app/tor"
    dest: "/home/cloud/venv/bin/tor"
    state: link
  when: torrepo.changed

- name: install onionperf service file
- name: Install the onionperf service file
  template:
    src: files/onionperf.service.j2
    dest: /etc/systemd/system/onionperf.service
  notify: restart onionperf
  become: true

- name: enable service onionperf
- name: Enable onionperf.service
  ansible.builtin.service:
    name: onionperf
    enabled: yes