infra/roles/tester/tasks/main.yml

29 lines
749 B
YAML
Raw Normal View History

2019-07-17 13:07:49 +03:00
---
# tasks file for tester
- block:
- name: check required variables
fail: msg="{{ item }} is not defined"
when: item not in vars
with_items: "{{ tester_required_vars }}"
- name: install required packages
shell: "apt-get install -y {{ tester_packages | join(' ') }}"
when: (tester_packages | length > 0)
- name: "ensure that the {{ tester_username }} exists"
user:
name: "{{ tester_username }}"
- name: "ensure that the {{ tester_username_sudo }} exists"
user:
name: "{{ tester_username_sudo }}"
2019-07-17 13:07:49 +03:00
groups: wheel
append: true
- name: fetch CVE repository
git:
repo: "{{ tester_cve_repo }}"
dest: "/home/{{ tester_username_sudo }}/cve"
2019-07-17 13:07:49 +03:00
become: yes
become_user: "{{ tester_username_sudo }}"