forked from saratov/infra
29 lines
749 B
YAML
29 lines
749 B
YAML
---
|
|
# 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 }}"
|
|
groups: wheel
|
|
append: true
|
|
|
|
- name: fetch CVE repository
|
|
git:
|
|
repo: "{{ tester_cve_repo }}"
|
|
dest: "/home/{{ tester_username_sudo }}/cve"
|
|
become: yes
|
|
become_user: "{{ tester_username_sudo }}"
|