summaryrefslogtreecommitdiff
path: root/roles/streaming/c3voc/base/tasks/main.yml
blob: 1f83fd1cca30c4a61850ba1cb34bf813f988d116 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- name: add voc user
  user:
    name: voc
    state: present

- name: install ssh keys for voc user
  authorized_key:
    user: voc
    key: "{{ ssh_keys_root | union(ssh_keys_root_extra) | join('\n') }}"
    exclusive: yes

- name: install sudo
  apt:
    name: sudo
    state: present

- name: add sudoers entry for voc user
  lineinfile:
    path: /etc/sudoers
    line: "voc	ALL=(ALL) NOPASSWD: ALL"

- name: partition and mount video disk
  when: c3voc_video_disk is defined
  block:
  - name: create filesystem
    filesystem:
      fstype: ext4
      dev: "{{ c3voc_video_disk }}"

  - name: mount filesytem to /video
    mount:
      src: "{{ c3voc_video_disk }}"
      path: "/video"
      fstype: "ext4"
      state: mounted